Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Client/mods/deathmatch/logic/CNetAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1547,9 +1547,15 @@ void CNetAPI::WriteVehiclePuresync(CClientPed* pPlayerModel, CClientVehicle* pVe
pPlayerModel->GetControllerState(ControllerState);
WriteFullKeysync(ControllerState, BitStream);

// Use parent model ID for non-standard vehicle model IDs.
// This avoids a mismatch between client and server, ensuring doors and damage sync correctly.
int iModelID = pVehicle->GetModel();
if (iModelID < 400 || iModelID > 611)
iModelID = pVehicle->GetModelInfo()->GetParentID();

// Write the clientside model
if (BitStream.Version() >= 0x05F)
BitStream.Write((int)pVehicle->GetModel());
BitStream.Write(iModelID);

// Grab the vehicle position
CVector vecPosition;
Expand Down