- Prevent damagecount overflow.

This commit is contained in:
drfrag 2021-01-05 19:40:36 +01:00
parent 622ef89812
commit 20b0d9711c

View file

@ -1345,7 +1345,7 @@ static int DamageMobj (AActor *target, AActor *inflictor, AActor *source, int da
player->LastDamageType = mod; player->LastDamageType = mod;
player->attacker = source; player->attacker = source;
player->damagecount += damage; // add damage after armor / invuln player->damagecount += damage; // add damage after armor / invuln
if (player->damagecount > 100) if (player->damagecount > 100 || player->damagecount < 0)
{ {
player->damagecount = 100; // teleport stomp does 10k points... player->damagecount = 100; // teleport stomp does 10k points...
} }