mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-21 19:51:27 +00:00
Virtualized returns for SpecialMissileHit/SpecialBounceHit
This commit is contained in:
parent
aec7feb48a
commit
fc809cfab6
3 changed files with 12 additions and 6 deletions
|
@ -89,6 +89,12 @@ class Actor : Thinker native
|
|||
const DEFMORPHTICS = 40 * TICRATE;
|
||||
const MELEEDELTA = 20;
|
||||
|
||||
enum EMissileHitResult
|
||||
{
|
||||
MHIT_DEFAULT = -1,
|
||||
MHIT_DESTROY = 0,
|
||||
MHIT_PASS = 1,
|
||||
}
|
||||
|
||||
// flags are not defined here, the native fields for those get synthesized from the internal tables.
|
||||
|
||||
|
@ -540,13 +546,13 @@ class Actor : Thinker native
|
|||
// This is called before a missile gets exploded.
|
||||
virtual int SpecialMissileHit (Actor victim)
|
||||
{
|
||||
return -1;
|
||||
return MHIT_DEFAULT;
|
||||
}
|
||||
|
||||
// This is called when a missile bounces off something.
|
||||
virtual int SpecialBounceHit(Actor bounceMobj, Line bounceLine, SecPlane bouncePlane)
|
||||
{
|
||||
return -1;
|
||||
return MHIT_DEFAULT;
|
||||
}
|
||||
|
||||
// Called when the player presses 'use' and an actor is found, except if the
|
||||
|
|
|
@ -147,7 +147,7 @@ class Lightning : Actor
|
|||
tracer = thing;
|
||||
}
|
||||
}
|
||||
return 1; // lightning zaps through all sprites
|
||||
return MHIT_PASS; // lightning zaps through all sprites
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -417,7 +417,7 @@ class LightningZap : Actor
|
|||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
return MHIT_DEFAULT;
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
|
|
|
@ -260,9 +260,9 @@ class MageStaffFX2 : Actor
|
|||
if (victim != target && !victim.player && !victim.bBoss)
|
||||
{
|
||||
victim.DamageMobj (self, target, 10, 'Fire');
|
||||
return 1; // Keep going
|
||||
return MHIT_PASS; // Keep going
|
||||
}
|
||||
return -1;
|
||||
return MHIT_DEFAULT;
|
||||
}
|
||||
|
||||
override bool SpecialBlastHandling (Actor source, double strength)
|
||||
|
|
Loading…
Reference in a new issue