Skip to content

Commit 3a75606

Browse files
committed
Update CStaticFunctionDefinitions.cpp
1 parent a33bb91 commit 3a75606

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,8 @@ bool CStaticFunctionDefinitions::SetElementPosition(CClientEntity& Entity, const
10781078

10791079
if (Entity.GetType() == CCLIENTVEHICLE)
10801080
{
1081-
if (!Entity.IsLocalEntity() && !static_cast<CDeathmatchVehicle&>(Entity).IsSyncing())
1081+
CClientPed* driver = static_cast<CClientVehicle&>(Entity).GetOccupant(0);
1082+
if (!Entity.IsLocalEntity() && !static_cast<CDeathmatchVehicle&>(Entity).IsSyncing() && (driver && !driver->IsLocalPlayer()))
10821083
return false;
10831084
}
10841085

0 commit comments

Comments
 (0)