@@ -1287,9 +1287,7 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
1287
1287
// differs from the local one (#8800)
1288
1288
int iModelID = pVehicle->GetModel ();
1289
1289
int iRemoteModelID = iModelID;
1290
-
1291
- if (BitStream.Version () >= 0x05F )
1292
- BitStream.Read (iRemoteModelID);
1290
+ BitStream.Read (iRemoteModelID);
1293
1291
1294
1292
eClientVehicleType remoteVehicleType = CClientVehicleManager::GetVehicleType (iRemoteModelID);
1295
1293
eClientVehicleType vehicleType = pVehicle->GetVehicleType ();
@@ -1478,7 +1476,7 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
1478
1476
}
1479
1477
1480
1478
// Read out the weapon ammo
1481
- SWeaponAmmoSync ammo (ucCurrentWeapon, BitStream. Version () >= 0x44 , true );
1479
+ SWeaponAmmoSync ammo (ucCurrentWeapon, true , true );
1482
1480
BitStream.Read (&ammo);
1483
1481
unsigned short usWeaponAmmo = ammo.data .usAmmoInClip ;
1484
1482
@@ -1487,7 +1485,7 @@ void CNetAPI::ReadVehiclePuresync(CClientPlayer* pPlayer, CClientVehicle* pVehic
1487
1485
CWeapon* pPlayerWeapon = pPlayer->GiveWeapon (static_cast <eWeaponType>(ucCurrentWeapon), usWeaponAmmo, true );
1488
1486
if (pPlayerWeapon)
1489
1487
{
1490
- pPlayerWeapon->SetAmmoTotal (BitStream. Version () >= 0x44 ? ammo.data .usTotalAmmo : 9999 );
1488
+ pPlayerWeapon->SetAmmoTotal (ammo.data .usTotalAmmo );
1491
1489
pPlayerWeapon->SetAmmoInClip (usWeaponAmmo);
1492
1490
}
1493
1491
}
@@ -1571,8 +1569,7 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
1571
1569
iModelID = pVehicle->GetModelInfo ()->GetParentID ();
1572
1570
1573
1571
// Write the clientside model
1574
- if (BitStream.Version () >= 0x05F )
1575
- BitStream.Write (iModelID);
1572
+ BitStream.Write (iModelID);
1576
1573
1577
1574
// Grab the vehicle position
1578
1575
CVector vecPosition;
@@ -1664,38 +1661,6 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
1664
1661
BitStream.WriteBit (false );
1665
1662
}
1666
1663
1667
- // Update Damage Info if changed
1668
- if (BitStream.Version () >= 0x047 )
1669
- {
1670
- if (!g_pClientGame->GetDamageSent ())
1671
- {
1672
- g_pClientGame->SetDamageSent (true );
1673
-
1674
- ElementID DamagerID = g_pClientGame->GetDamagerID ();
1675
- if (DamagerID != RESERVED_ELEMENT_ID)
1676
- {
1677
- BitStream.WriteBit (true );
1678
- BitStream.Write (DamagerID);
1679
-
1680
- SWeaponTypeSync weaponType;
1681
- weaponType.data .ucWeaponType = g_pClientGame->GetDamageWeapon ();
1682
- BitStream.Write (&weaponType);
1683
-
1684
- SBodypartSync bodypart;
1685
- bodypart.data .uiBodypart = g_pClientGame->GetDamageBodyPiece ();
1686
- BitStream.Write (&bodypart);
1687
- }
1688
- else
1689
- {
1690
- BitStream.WriteBit (false );
1691
- }
1692
- }
1693
- else
1694
- {
1695
- BitStream.WriteBit (false );
1696
- }
1697
- }
1698
-
1699
1664
// Player health sync (scaled from 0.0f-200.0f to 0-255 to save three bytes).
1700
1665
// Scale goes up to 200.0f because having max stats gives you the double of health.
1701
1666
SPlayerHealthSync health;
@@ -1738,7 +1703,7 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
1738
1703
if (flags.data .bIsDoingGangDriveby && CWeaponNames::DoesSlotHaveAmmo (uiSlot))
1739
1704
{
1740
1705
// Write the ammo states
1741
- SWeaponAmmoSync ammo (pPlayerWeapon->GetType (), BitStream. Version () >= 0x44 , true );
1706
+ SWeaponAmmoSync ammo (pPlayerWeapon->GetType (), true , true );
1742
1707
ammo.data .usAmmoInClip = static_cast <unsigned short >(pPlayerWeapon->GetAmmoInClip ());
1743
1708
ammo.data .usTotalAmmo = static_cast <unsigned short >(pPlayerWeapon->GetAmmoTotal ());
1744
1709
BitStream.Write (&ammo);
@@ -1984,8 +1949,7 @@ void CNetAPI::WriteCameraSync(NetBitStreamInterface& BitStream)
1984
1949
{
1985
1950
CClientCamera* pCamera = m_pManager->GetCamera ();
1986
1951
1987
- if (BitStream.Version () >= 0x05E )
1988
- BitStream.Write (pCamera->GetSyncTimeContext ());
1952
+ BitStream.Write (pCamera->GetSyncTimeContext ());
1989
1953
1990
1954
// Are we in fixed mode?
1991
1955
bool bFixed = pCamera->IsInFixedMode ();
@@ -2235,9 +2199,6 @@ void CNetAPI::ReadVehicleResync(CClientVehicle* pVehicle, NetBitStreamInterface&
2235
2199
2236
2200
void CNetAPI::ReadVehiclePartsState (CClientVehicle* pVehicle, NetBitStreamInterface& BitStream)
2237
2201
{
2238
- if (BitStream.Version () < 0x5D )
2239
- return ;
2240
-
2241
2202
SVehicleDamageSyncMethodeB damage;
2242
2203
BitStream.Read (&damage);
2243
2204
bool flyingComponents = m_pVehicleManager->IsSpawnFlyingComponentEnabled ();
0 commit comments