mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-17 01:31:25 +00:00
- fixed: Dormant monsters should not be telefraggable.
This commit is contained in:
parent
164d523eca
commit
94a04f36e5
1 changed files with 64 additions and 61 deletions
|
@ -1031,13 +1031,15 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
{
|
||||
target->velx = target->vely = target->velz = 0;
|
||||
}
|
||||
if (!(flags & DMG_FORCED) && damage < TELEFRAG_DAMAGE) // DMG_FORCED skips all special damage checks, TELEFRAG_DAMAGE may not be reduced at all
|
||||
if (!(flags & DMG_FORCED)) // DMG_FORCED skips all special damage checks, TELEFRAG_DAMAGE may not be reduced at all
|
||||
{
|
||||
if (target->flags2 & MF2_DORMANT)
|
||||
{
|
||||
// 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;
|
||||
if (player && damage > 1)
|
||||
{
|
||||
|
@ -1061,7 +1063,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
}
|
||||
}
|
||||
|
||||
damage = inflictor->DoSpecialDamage (target, damage, mod);
|
||||
damage = inflictor->DoSpecialDamage(target, damage, mod);
|
||||
if (damage < 0)
|
||||
{
|
||||
return -1;
|
||||
|
@ -1115,6 +1117,7 @@ int P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (damage < 0)
|
||||
{
|
||||
// any negative value means that something in the above chain has cancelled out all damage and all damage effects, including pain.
|
||||
|
|
Loading…
Reference in a new issue