mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-10 14:51:40 +00:00
- fixed: Not all paths in A_CStaffCheck did proper checks on the player's health.
This commit is contained in:
parent
94f37bde30
commit
c390b98966
1 changed files with 4 additions and 1 deletions
|
@ -112,7 +112,10 @@ DEFINE_ACTION_FUNCTION(AActor, A_CStaffCheck)
|
|||
{
|
||||
newLife = player->health + (damage >> 4);
|
||||
newLife = newLife > max ? max : newLife;
|
||||
pmo->health = player->health = newLife;
|
||||
if (newLife > player->health)
|
||||
{
|
||||
pmo->health = player->health = newLife;
|
||||
}
|
||||
P_SetPsprite(player, ps_weapon, weapon->FindState("Drain"));
|
||||
}
|
||||
if (weapon != NULL)
|
||||
|
|
Loading…
Reference in a new issue