Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
FileEX committed Oct 9, 2024
1 parent 4e18928 commit a59b8ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Client/mods/deathmatch/logic/CClientPed.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,10 @@ void CClientPed::WarpIntoVehicle(CClientVehicle* pVehicle, unsigned int uiSeat)
}
}

// Wrong seat or undefined passengers count?
if ((uiSeat > 0 && uiSeat > pVehicle->m_ucMaxPassengers) || (uiSeat > 0 && pVehicle->m_ucMaxPassengers == 255))
return;

// Transfer WaitingForGroundToLoad state to vehicle
if (m_bIsLocalPlayer)
{
Expand Down
7 changes: 6 additions & 1 deletion Client/mods/deathmatch/logic/CClientVehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2656,7 +2656,12 @@ void CClientVehicle::Create()
{
if (m_pPassengers[i])
{
m_pPassengers[i]->WarpIntoVehicle(this, i + 1);
// Undefined passengers count?
if (m_ucMaxPassengers != 255)
m_pPassengers[i]->WarpIntoVehicle(this, i + 1);
else
m_pPassengers[i]->SetWarpInToVehicleRequired(false);

if (m_pPassengers[i])
m_pPassengers[i]->StreamIn(true);
}
Expand Down

0 comments on commit a59b8ad

Please sign in to comment.