Skip to content

Commit b463dce

Browse files
Synchronize changes from 1.6 master branch [ci skip]
c2c62e1 Fix `isPedDead` didn't check network dead state for players (#4576) a2c3274 Visual Studio Update
2 parents f16d8c6 + c2c62e1 commit b463dce

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,6 +1804,13 @@ int CLuaPedDefs::IsPedDead(lua_State* luaVM)
18041804
{
18051805
// Grab his dead state and return it
18061806
bool bDead = pPed->IsDead() || pPed->IsDying();
1807+
1808+
// Check player is already dead on network (#4147)
1809+
if (auto pPlayer = dynamic_cast<CClientPlayer*>(pPed))
1810+
{
1811+
bDead = bDead || pPlayer->IsDeadOnNetwork();
1812+
}
1813+
18071814
lua_pushboolean(luaVM, bDead);
18081815
return 1;
18091816
}

0 commit comments

Comments
 (0)