Skip to content

Commit 9f29b2a

Browse files
committed
Update CStaticFunctionDefinitions.cpp
1 parent 443d745 commit 9f29b2a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1498,16 +1498,15 @@ bool CStaticFunctionDefinitions::SetElementHealth(CClientEntity& Entity, float f
14981498
{
14991499
RUN_CHILDREN(SetElementHealth(**iter, fHealth))
15001500

1501-
if (!Entity.IsLocalEntity())
1502-
return false;
1503-
15041501
switch (Entity.GetType())
15051502
{
15061503
case CCLIENTPED:
15071504
case CCLIENTPLAYER:
15081505
{
15091506
// Grab the model
15101507
CClientPed& Ped = static_cast<CClientPed&>(Entity);
1508+
if (Ped.IsLocalPlayer())
1509+
return false;
15111510

15121511
// Set the new health
15131512
Ped.SetHealth(Clamp(0.0f, fHealth, Ped.GetMaxHealth()));

0 commit comments

Comments
 (0)