diff --git a/Server/Program.cs b/Server/Program.cs index 3aab953..bedabfa 100644 --- a/Server/Program.cs +++ b/Server/Program.cs @@ -88,7 +88,8 @@ server.PacketHandler = (c, p) => { break; } server.BroadcastReplace(gamePacket, c, (from, to, gp) => { - gp.ScenarioNum = (byte?) from.Metadata["scenario"] ?? 200; + gp.ScenarioNum = (byte?) to.Metadata["scenario"] ?? 200; + from.Logger.Warn($"to {to.Logger.Name}, {to.Metadata["scenario"]}-{gp.ScenarioNum}"); to.Send(gp, from); }); diff --git a/Shared/Packet/Packets/GamePacket.cs b/Shared/Packet/Packets/GamePacket.cs index 3f35055..dc39066 100644 --- a/Shared/Packet/Packets/GamePacket.cs +++ b/Shared/Packet/Packets/GamePacket.cs @@ -5,17 +5,14 @@ namespace Shared.Packet.Packets; [Packet(PacketType.Game)] public struct GamePacket : IPacket { - private const int StageSize = 0x30; - public bool Is2d; - public byte ScenarioNum; + private const int StageSize = 0x38; + public bool Is2d = false; + public byte ScenarioNum = 0; public string Stage = ""; - public GamePacket() { - Is2d = false; - ScenarioNum = 0; - } + public GamePacket() { } - public short Size => 0x32; + public short Size => 0x3A; public void Serialize(Span data) { MemoryMarshal.Write(data[..0], ref Is2d); MemoryMarshal.Write(data[1..], ref ScenarioNum);