mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-12 05:11:45 +00:00
- Prevent damagecount overflow.
This commit is contained in:
parent
622ef89812
commit
20b0d9711c
1 changed files with 1 additions and 1 deletions
|
@ -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...
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue