@@ -4613,34 +4613,32 @@ bool CClientGame::VehicleCollisionHandler(CVehicleSAInterface*& pCollidingVehicl
4613
4613
// Make sure it created
4614
4614
if (pBitStream)
4615
4615
{
4616
- if (pBitStream->Version () >= 0x028 )
4616
+ // Sync Stuff
4617
+ // if it's not a local vehicle + it collided with the local player
4618
+ if (pVehicleClientEntity->IsLocalEntity () == false && pCollidedWithClientEntity == g_pClientGame->GetLocalPlayer ())
4617
4619
{
4618
- // Sync Stuff
4619
- // if it's not a local vehicle + it collided with the local player
4620
- if (pVehicleClientEntity->IsLocalEntity () == false && pCollidedWithClientEntity == g_pClientGame->GetLocalPlayer ())
4620
+ // is it below the anti spam threshold?
4621
+ if (pClientVehicle->GetTimeSinceLastPush () >= MIN_PUSH_ANTISPAM_RATE)
4621
4622
{
4622
- // is it below the anti spam threshold?
4623
- if (pClientVehicle->GetTimeSinceLastPush () >= MIN_PUSH_ANTISPAM_RATE )
4623
+ // if there is no controlling player
4624
+ if (! pClientVehicle->GetControllingPlayer () )
4624
4625
{
4625
- // if there is no controlling player
4626
- if (!pClientVehicle->GetControllingPlayer ())
4626
+ CDeathmatchVehicle* Vehicle = static_cast <CDeathmatchVehicle*>(pVehicleClientEntity);
4627
+ // if We aren't already syncing the vehicle
4628
+ if (GetUnoccupiedVehicleSync ()->Exists (Vehicle) == false )
4627
4629
{
4628
- CDeathmatchVehicle* Vehicle = static_cast <CDeathmatchVehicle*>(pVehicleClientEntity);
4629
- // if We aren't already syncing the vehicle
4630
- if (GetUnoccupiedVehicleSync ()->Exists (Vehicle) == false )
4631
- {
4632
- // Write the vehicle ID
4633
- pBitStream->Write (pVehicleClientEntity->GetID ());
4634
- // Send!
4635
- g_pNet->SendPacket (PACKET_ID_VEHICLE_PUSH_SYNC, pBitStream, PACKET_PRIORITY_MEDIUM,
4636
- PACKET_RELIABILITY_UNRELIABLE_SEQUENCED);
4637
- // Reset our push time
4638
- pClientVehicle->ResetLastPushTime ();
4639
- }
4630
+ // Write the vehicle ID
4631
+ pBitStream->Write (pVehicleClientEntity->GetID ());
4632
+ // Send!
4633
+ g_pNet->SendPacket (PACKET_ID_VEHICLE_PUSH_SYNC, pBitStream, PACKET_PRIORITY_MEDIUM,
4634
+ PACKET_RELIABILITY_UNRELIABLE_SEQUENCED);
4635
+ // Reset our push time
4636
+ pClientVehicle->ResetLastPushTime ();
4640
4637
}
4641
4638
}
4642
4639
}
4643
4640
}
4641
+
4644
4642
g_pNet->DeallocateNetBitStream (pBitStream);
4645
4643
}
4646
4644
return true ;
@@ -5350,9 +5348,7 @@ void CClientGame::SendProjectileSync(CClientProjectile* pProjectile)
5350
5348
pBitStream->Write (&weaponTypeSync);
5351
5349
5352
5350
// Write the projectile's model
5353
- if (pBitStream->Version () >= 0x4F )
5354
- if (pBitStream->Version () >= 0x52 || pOriginSource) // Fix possible error for 0x51 server
5355
- pBitStream->Write (pProjectile->GetModel ());
5351
+ pBitStream->Write (pProjectile->GetModel ());
5356
5352
5357
5353
switch (weaponType)
5358
5354
{
@@ -6242,10 +6238,7 @@ void CClientGame::TakePlayerScreenShot(uint uiSizeX, uint uiSizeY, const SString
6242
6238
else
6243
6239
pBitStream->Write ((uchar)EPlayerScreenShotResult::MINIMIZED);
6244
6240
pBitStream->Write (uiServerSentTime);
6245
- if (pBitStream->Version () >= 0x053 )
6246
- pBitStream->Write (pResource->GetNetID ());
6247
- else
6248
- pBitStream->WriteString (pResource->GetName ());
6241
+ pBitStream->Write (pResource->GetNetID ());
6249
6242
pBitStream->WriteString (strTag);
6250
6243
g_pNet->SendPacket (PACKET_ID_PLAYER_SCREENSHOT, pBitStream, PACKET_PRIORITY_LOW, PACKET_RELIABILITY_RELIABLE_ORDERED, PACKET_ORDERING_DATA_TRANSFER);
6251
6244
g_pNet->DeallocateNetBitStream (pBitStream);
@@ -6310,13 +6303,9 @@ void CClientGame::GottenPlayerScreenShot(const CBuffer* pBuffer, uint uiTimeSpen
6310
6303
NetBitStreamInterface* pBitStream = g_pNet->AllocateNetBitStream ();
6311
6304
pBitStream->Write ((uchar)EPlayerScreenShotResult::ERROR_);
6312
6305
pBitStream->Write (uiServerGrabTime);
6313
- if (pBitStream->Version () >= 0x053 )
6314
- pBitStream->Write (pResource->GetNetID ());
6315
- else
6316
- pBitStream->WriteString (pResource->GetName ());
6306
+ pBitStream->Write (pResource->GetNetID ());
6317
6307
pBitStream->WriteString (strTag);
6318
- if (pBitStream->Version () >= 0x053 )
6319
- pBitStream->WriteString (strError);
6308
+ pBitStream->WriteString (strError);
6320
6309
g_pNet->SendPacket (PACKET_ID_PLAYER_SCREENSHOT, pBitStream, PACKET_PRIORITY_LOW, PACKET_RELIABILITY_RELIABLE_ORDERED, PACKET_ORDERING_DATA_TRANSFER);
6321
6310
g_pNet->DeallocateNetBitStream (pBitStream);
6322
6311
return ;
@@ -6356,10 +6345,7 @@ void CClientGame::GottenPlayerScreenShot(const CBuffer* pBuffer, uint uiTimeSpen
6356
6345
pBitStream->Write (uiServerGrabTime);
6357
6346
pBitStream->Write (uiTotalByteSize);
6358
6347
pBitStream->Write ((ushort)uiNumParts);
6359
- if (pBitStream->Version () >= 0x053 )
6360
- pBitStream->Write (pResource->GetNetID ());
6361
- else
6362
- pBitStream->WriteString (pResource->GetName ());
6348
+ pBitStream->Write (pResource->GetNetID ());
6363
6349
pBitStream->WriteString (strTag);
6364
6350
}
6365
6351
0 commit comments