0
0
Fork 0
mirror of https://github.com/Sanae6/SmoOnlineServer.git synced 2024-11-22 03:05:16 +00:00

Change game packet size

This commit is contained in:
Sanae 2022-04-27 14:36:36 -06:00
parent 88f61f9e79
commit 24e4333fde

View file

@ -5,14 +5,14 @@ namespace Shared.Packet.Packets;
[Packet(PacketType.Game)] [Packet(PacketType.Game)]
public struct GamePacket : IPacket { public struct GamePacket : IPacket {
private const int StageSize = 0x38; private const int StageSize = 0x40;
public bool Is2d = false; public bool Is2d = false;
public byte ScenarioNum = 0; public byte ScenarioNum = 0;
public string Stage = ""; public string Stage = "";
public GamePacket() { } public GamePacket() { }
public short Size => 0x3A; public short Size => 0x42;
public void Serialize(Span<byte> data) { public void Serialize(Span<byte> data) {
MemoryMarshal.Write(data, ref Is2d); MemoryMarshal.Write(data, ref Is2d);
MemoryMarshal.Write(data[1..], ref ScenarioNum); MemoryMarshal.Write(data[1..], ref ScenarioNum);