Skip to content

Commit 3470a1a

Browse files
committed
Move fSpeed as per comment
1 parent 493352c commit 3470a1a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Server/mods/deathmatch/logic/packets/CVehiclePuresyncPacket.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,16 +83,14 @@ bool CVehiclePuresyncPacket::Read(NetBitStreamInterface& BitStream)
8383

8484
BitStream.Read(fPosition);
8585
BitStream.ReadBit(bDirection);
86+
BitStream.Read(fSpeed);
8687

8788
// TODO(qaisjp, feature/custom-train-tracks): this needs to be changed to an ElementID when the time is right (in a backwards compatible manner)
8889
// Note: here we use a uchar, in the CTT branch this is a uint. Just don't forget that, it might be important
8990
uchar trackIndex;
9091
BitStream.Read(trackIndex);
9192
pTrainTrack = g_pGame->GetTrainTrackManager()->GetTrainTrackByIndex(trackIndex);
9293

93-
// In 1.6 we can move this under bDirection for neatness. We can't do it right now because of backwards compat.
94-
BitStream.Read(fSpeed);
95-
9694
// But we should only actually apply that train-specific data if that vehicle is train on our side
9795
if (vehicleType == VEHICLE_TRAIN)
9896
{
@@ -514,6 +512,7 @@ bool CVehiclePuresyncPacket::Write(NetBitStreamInterface& BitStream) const
514512

515513
BitStream.Write(fPosition);
516514
BitStream.WriteBit(bDirection);
515+
BitStream.Write(fSpeed);
517516

518517
// Push the train track information
519518
const auto trainTrack = pVehicle->GetTrainTrack();
@@ -534,9 +533,6 @@ bool CVehiclePuresyncPacket::Write(NetBitStreamInterface& BitStream) const
534533
// TODO(qaisjp, feature/custom-train-tracks): implement behaviour for non-default tracks
535534
assert(0 && "It is impossible for custom train tracks to exist right now, so this should never be reached.");
536535
}
537-
538-
// In 1.6 we can move this under bDirection for neatness. We can't do it right now because of backwards compat.
539-
BitStream.Write(fSpeed);
540536
}
541537

542538
// Vehicle rotation

0 commit comments

Comments
 (0)