~ruther/NosSmooth

99aaa9b108e0e125d0c7795f4d35bcc3ba8e0b90 — Rutherther 2 years ago 7793e41 + 1dac28c
Merge pull request #71 from plsfixrito/PtctlPacket-

Add missing fields to PtctlPacket
M Packets/NosSmooth.Packets/Client/Mates/PtctlPacket.cs => Packets/NosSmooth.Packets/Client/Mates/PtctlPacket.cs +8 -2
@@ 14,6 14,8 @@ namespace NosSmooth.Packets.Client.Mates;
/// <param name="MapId">The current map id.</param>
/// <param name="ControlsCount">The count of controls in array.</param>
/// <param name="Controls">The array containing the mates to move and positions to move them to.</param>
/// <param name="EntityId">Seems to always be euqal to first EntityId in Controls.</param>
/// <param name="Speed">The movement speed.</param>
[PacketHeader("ptctl", PacketSource.Server)]
[GenerateSerializer(true)]
public record PtctlPacket


@@ 22,6 24,10 @@ public record PtctlPacket
    short MapId,
    [PacketIndex(1)]
    uint? ControlsCount,
    [PacketContextList(2, "ControlsCount", ListSeparator = ' ')]
    IReadOnlyList<PtctlSubPacket> Controls
    [PacketContextList(2, "ControlsCount", ListSeparator = ' ', InnerSeparator = ' ')]
    IReadOnlyList<PtctlSubPacket> Controls,
    [PacketIndex(3)]
    long EntityId,
    [PacketIndex(4)]
    short Speed
) : IPacket;
\ No newline at end of file

M Tests/NosSmooth.Packets.Tests/Converters/Packets/PtctlPacketConverterTests.cs => Tests/NosSmooth.Packets.Tests/Converters/Packets/PtctlPacketConverterTests.cs +3 -1
@@ 61,7 61,9 @@ public class PtctlPacketConverterTests
                    {
                        new PtctlSubPacket(123, 26, 21)
                    }
                )
                ),
                123,
                13
            )
        );
    }

Do not follow this link