Skip to content
Open
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion Server/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,9 @@ int CLuaPedDefs::IsPedInVehicle(lua_State* luaVM)

if (!argStream.HasErrors())
{
lua_pushboolean(luaVM, CStaticFunctionDefinitions::GetPedOccupiedVehicle(pPed) != NULL);
CVehicle* pVehicle = CStaticFunctionDefinitions::GetPedOccupiedVehicle(pPed);
bool bInVehicle = (pVehicle != NULL) && (pPed->GetVehicleAction() == CPed::VEHICLEACTION_NONE);
lua_pushboolean(luaVM, bInVehicle);
return 1;
}
else
Expand Down