@@ -625,8 +625,8 @@ void CNetAPI::ReadKeysync(CClientPlayer* pPlayer, NetBitStreamInterface& BitStre
625625 BitStream.Read (&aim);
626626
627627 // Read out the driveby direction
628- unsigned char ucDriveByAim;
629- BitStream.Read (ucDriveByAim);
628+ eVehicleAimDirection ucDriveByAim;
629+ BitStream.Read (* reinterpret_cast < char *>(& ucDriveByAim) );
630630
631631 // Set the aim data (immediately if in vehicle, otherwize delayed/interpolated)
632632 if (pVehicle)
@@ -763,7 +763,7 @@ void CNetAPI::WriteKeysync(CClientPed* pPlayerModel, NetBitStreamInterface& BitS
763763
764764 // Write the driveby direction
765765 CShotSyncData* pShotsyncData = g_pMultiplayer->GetLocalShotSyncData ();
766- BitStream.Write (pShotsyncData->m_cInVehicleAimDirection );
766+ BitStream.Write (static_cast < char >( pShotsyncData->m_cInVehicleAimDirection ) );
767767 }
768768 }
769769 else
@@ -928,7 +928,7 @@ void CNetAPI::ReadPlayerPuresync(CClientPlayer* pPlayer, NetBitStreamInterface&
928928 BitStream.Read (&aim);
929929
930930 // Interpolate the aiming
931- pPlayer->SetAimInterpolated (TICK_RATE_AIM, rotation.data .fRotation , aim.data .fArm , flags.data .bAkimboTargetUp , 0 );
931+ pPlayer->SetAimInterpolated (TICK_RATE_AIM, rotation.data .fRotation , aim.data .fArm , flags.data .bAkimboTargetUp , eVehicleAimDirection::FORWARDS );
932932
933933 // Read the aim data only if he's shooting or aiming
934934 if (aim.isFull ())
@@ -1484,9 +1484,10 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
14841484 // Read out the driveby direction
14851485 SDrivebyDirectionSync driveby;
14861486 BitStream.Read (&driveby);
1487+ eVehicleAimDirection ucDirection = static_cast <eVehicleAimDirection>(driveby.data .ucDirection );
14871488
14881489 // Set the aiming
1489- pPlayer->SetAimingData (TICK_RATE, aim.data .vecTarget , aim.data .fArm , 0 .0f , driveby. data . ucDirection , &aim.data .vecOrigin , false );
1490+ pPlayer->SetAimingData (TICK_RATE, aim.data .vecTarget , aim.data .fArm , 0 .0f , ucDirection, &aim.data .vecOrigin , false );
14901491 }
14911492 else
14921493 {
@@ -1727,7 +1728,7 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
17271728 // Sync driveby direction
17281729 CShotSyncData* pShotsyncData = g_pMultiplayer->GetLocalShotSyncData ();
17291730 SDrivebyDirectionSync driveby;
1730- driveby.data .ucDirection = static_cast < unsigned char >( pShotsyncData->m_cInVehicleAimDirection ) ;
1731+ driveby.data .ucDirection = pShotsyncData->m_cInVehicleAimDirection ;
17311732 BitStream.Write (&driveby);
17321733 }
17331734 }
0 commit comments