@@ -4613,34 +4613,32 @@ bool CClientGame::VehicleCollisionHandler(CVehicleSAInterface*& pCollidingVehicl
46134613 // Make sure it created
46144614 if (pBitStream)
46154615 {
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 ())
46174619 {
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)
46214622 {
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 () )
46244625 {
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 )
46274629 {
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 ();
46404637 }
46414638 }
46424639 }
46434640 }
4641+
46444642 g_pNet->DeallocateNetBitStream (pBitStream);
46454643 }
46464644 return true ;
@@ -5350,9 +5348,7 @@ void CClientGame::SendProjectileSync(CClientProjectile* pProjectile)
53505348 pBitStream->Write (&weaponTypeSync);
53515349
53525350 // 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 ());
53565352
53575353 switch (weaponType)
53585354 {
@@ -6242,10 +6238,7 @@ void CClientGame::TakePlayerScreenShot(uint uiSizeX, uint uiSizeY, const SString
62426238 else
62436239 pBitStream->Write ((uchar)EPlayerScreenShotResult::MINIMIZED);
62446240 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 ());
62496242 pBitStream->WriteString (strTag);
62506243 g_pNet->SendPacket (PACKET_ID_PLAYER_SCREENSHOT, pBitStream, PACKET_PRIORITY_LOW, PACKET_RELIABILITY_RELIABLE_ORDERED, PACKET_ORDERING_DATA_TRANSFER);
62516244 g_pNet->DeallocateNetBitStream (pBitStream);
@@ -6310,13 +6303,9 @@ void CClientGame::GottenPlayerScreenShot(const CBuffer* pBuffer, uint uiTimeSpen
63106303 NetBitStreamInterface* pBitStream = g_pNet->AllocateNetBitStream ();
63116304 pBitStream->Write ((uchar)EPlayerScreenShotResult::ERROR_);
63126305 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 ());
63176307 pBitStream->WriteString (strTag);
6318- if (pBitStream->Version () >= 0x053 )
6319- pBitStream->WriteString (strError);
6308+ pBitStream->WriteString (strError);
63206309 g_pNet->SendPacket (PACKET_ID_PLAYER_SCREENSHOT, pBitStream, PACKET_PRIORITY_LOW, PACKET_RELIABILITY_RELIABLE_ORDERED, PACKET_ORDERING_DATA_TRANSFER);
63216310 g_pNet->DeallocateNetBitStream (pBitStream);
63226311 return ;
@@ -6356,10 +6345,7 @@ void CClientGame::GottenPlayerScreenShot(const CBuffer* pBuffer, uint uiTimeSpen
63566345 pBitStream->Write (uiServerGrabTime);
63576346 pBitStream->Write (uiTotalByteSize);
63586347 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 ());
63636349 pBitStream->WriteString (strTag);
63646350 }
63656351
0 commit comments