@@ -83,16 +83,14 @@ bool CVehiclePuresyncPacket::Read(NetBitStreamInterface& BitStream)
83
83
84
84
BitStream.Read (fPosition );
85
85
BitStream.ReadBit (bDirection);
86
+ BitStream.Read (fSpeed );
86
87
87
88
// TODO(qaisjp, feature/custom-train-tracks): this needs to be changed to an ElementID when the time is right (in a backwards compatible manner)
88
89
// Note: here we use a uchar, in the CTT branch this is a uint. Just don't forget that, it might be important
89
90
uchar trackIndex;
90
91
BitStream.Read (trackIndex);
91
92
pTrainTrack = g_pGame->GetTrainTrackManager ()->GetTrainTrackByIndex (trackIndex);
92
93
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
-
96
94
// But we should only actually apply that train-specific data if that vehicle is train on our side
97
95
if (vehicleType == VEHICLE_TRAIN)
98
96
{
@@ -514,6 +512,7 @@ bool CVehiclePuresyncPacket::Write(NetBitStreamInterface& BitStream) const
514
512
515
513
BitStream.Write (fPosition );
516
514
BitStream.WriteBit (bDirection);
515
+ BitStream.Write (fSpeed );
517
516
518
517
// Push the train track information
519
518
const auto trainTrack = pVehicle->GetTrainTrack ();
@@ -534,9 +533,6 @@ bool CVehiclePuresyncPacket::Write(NetBitStreamInterface& BitStream) const
534
533
// TODO(qaisjp, feature/custom-train-tracks): implement behaviour for non-default tracks
535
534
assert (0 && " It is impossible for custom train tracks to exist right now, so this should never be reached." );
536
535
}
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 );
540
536
}
541
537
542
538
// Vehicle rotation
0 commit comments