- fixed: With the recent changes to the damage code, the check for MF5_NODAMAGE was too early. Putting it into AActor::TakeSpecialDamage is also not the best idea because that limits that function's potential.
This commit is contained in:
parent
d481ba7b5a
commit
d940c6a2ee
2 changed files with 5 additions and 5 deletions
|
|
@ -1038,6 +1038,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
// Invulnerable, and won't wake up
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (damage < TELEFRAG_DAMAGE) // TELEFRAG_DAMAGE may not be reduced at all or it may not guarantee its effect.
|
||||
{
|
||||
player = target->player;
|
||||
|
|
@ -1116,6 +1117,10 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
if (target->flags5 & MF5_NODAMAGE)
|
||||
{
|
||||
damage = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (damage < 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue