mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 20:43:15 +00:00
- added DavidPH's submission for allowing a special state on puffs when hitting bleeding actors.
SVN r3234 (trunk)
This commit is contained in:
parent
6ba0689b8d
commit
a587ffed57
3 changed files with 9 additions and 1 deletions
|
@ -100,7 +100,8 @@ enum EPuffFlags
|
||||||
{
|
{
|
||||||
PF_HITTHING = 1,
|
PF_HITTHING = 1,
|
||||||
PF_MELEERANGE = 2,
|
PF_MELEERANGE = 2,
|
||||||
PF_TEMPORARY = 4
|
PF_TEMPORARY = 4,
|
||||||
|
PF_HITTHINGBLEED = 8
|
||||||
};
|
};
|
||||||
|
|
||||||
AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t y, fixed_t z, angle_t dir, int updown, int flags = 0);
|
AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t y, fixed_t z, angle_t dir, int updown, int flags = 0);
|
||||||
|
|
|
@ -3485,6 +3485,9 @@ AActor *P_LineAttack (AActor *t1, angle_t angle, fixed_t distance,
|
||||||
(trace.Actor->flags & MF_NOBLOOD) ||
|
(trace.Actor->flags & MF_NOBLOOD) ||
|
||||||
(trace.Actor->flags2 & (MF2_INVULNERABLE|MF2_DORMANT)))
|
(trace.Actor->flags2 & (MF2_INVULNERABLE|MF2_DORMANT)))
|
||||||
{
|
{
|
||||||
|
if (!(trace.Actor->flags & MF_NOBLOOD))
|
||||||
|
flags |= PF_HITTHINGBLEED;
|
||||||
|
|
||||||
// We must pass the unreplaced puff type here
|
// We must pass the unreplaced puff type here
|
||||||
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, flags|PF_HITTHING);
|
puff = P_SpawnPuff (t1, pufftype, hitx, hity, hitz, angle - ANG180, 2, flags|PF_HITTHING);
|
||||||
}
|
}
|
||||||
|
|
|
@ -4421,6 +4421,10 @@ AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t
|
||||||
{
|
{
|
||||||
puff->SetState (crashstate);
|
puff->SetState (crashstate);
|
||||||
}
|
}
|
||||||
|
else if ((flags & PF_HITTHINGBLEED) && (crashstate = puff->FindState(NAME_Death, NAME_Extreme, true)) != NULL)
|
||||||
|
{
|
||||||
|
puff->SetState (crashstate);
|
||||||
|
}
|
||||||
else if ((flags & PF_MELEERANGE) && puff->MeleeState != NULL)
|
else if ((flags & PF_MELEERANGE) && puff->MeleeState != NULL)
|
||||||
{
|
{
|
||||||
// handle the hard coded state jump of Doom's bullet puff
|
// handle the hard coded state jump of Doom's bullet puff
|
||||||
|
|
Loading…
Reference in a new issue