Skip to content

Commit 40c43ed

Browse files
committed
Fix bug
1 parent 2c9f48c commit 40c43ed

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Client/mods/deathmatch/logic/CClientGame.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4394,12 +4394,10 @@ bool CClientGame::ApplyPedDamageFromGame(eWeaponType weaponUsed, float fDamage,
43944394
return false;
43954395
}
43964396

4397-
if (pDamagedPed->IsLocalPlayer())
4398-
{
4399-
// Reget values in case they have been changed during onClientPlayerDamage event (Avoid AC#1 kick)
4400-
fCurrentHealth = pDamagedPed->GetGamePlayer()->GetHealth();
4401-
fCurrentArmor = pDamagedPed->GetGamePlayer()->GetArmor();
4402-
}
4397+
// Reget values in case they have been changed during onClientPlayerDamage event (Avoid AC#1 kick)
4398+
// (FileEX): We need to refresh the health value here because it may have been changed in the onClientPedDamage/onClientPlayerDamage event
4399+
fCurrentHealth = pDamagedPed->GetGamePlayer()->GetHealth();
4400+
fCurrentArmor = pDamagedPed->GetGamePlayer()->GetArmor();
44034401

44044402
bool bIsBeingShotWhilstAiming = (weaponUsed >= WEAPONTYPE_PISTOL && weaponUsed <= WEAPONTYPE_MINIGUN && pDamagedPed->IsUsingGun());
44054403
bool bOldBehaviour = !IsGlitchEnabled(GLITCH_HITANIM);

0 commit comments

Comments
 (0)