mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-14 08:30:50 +00:00
- Fixed HITTARGET, HITMASTER, HITTRACER, crash and xdeath states being broken on bouncing actors that die/explode.
This commit is contained in:
parent
1eb2c75328
commit
46ee2c5ec6
2 changed files with 9 additions and 6 deletions
|
@ -3535,9 +3535,9 @@ bool P_BounceActor(AActor *mo, AActor *BlockingMobj, bool ontop)
|
||||||
if (mo->bouncecount>0 && --mo->bouncecount == 0)
|
if (mo->bouncecount>0 && --mo->bouncecount == 0)
|
||||||
{
|
{
|
||||||
if (mo->flags & MF_MISSILE)
|
if (mo->flags & MF_MISSILE)
|
||||||
P_ExplodeMissile(mo, nullptr, nullptr);
|
P_ExplodeMissile(mo, nullptr, BlockingMobj);
|
||||||
else
|
else
|
||||||
mo->CallDie(nullptr, nullptr);
|
mo->CallDie(BlockingMobj, nullptr);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1814,16 +1814,19 @@ void P_ExplodeMissile (AActor *mo, line_t *line, AActor *target)
|
||||||
mo->effects = 0; // [RH]
|
mo->effects = 0; // [RH]
|
||||||
mo->flags &= ~MF_SHOOTABLE;
|
mo->flags &= ~MF_SHOOTABLE;
|
||||||
|
|
||||||
FState *nextstate=NULL;
|
FState *nextstate = nullptr;
|
||||||
|
|
||||||
if (target != NULL && ((target->flags & (MF_SHOOTABLE|MF_CORPSE)) || (target->flags6 & MF6_KILLED)) )
|
if (target != nullptr)
|
||||||
{
|
{
|
||||||
if (mo->flags7 & MF7_HITTARGET) mo->target = target;
|
if (mo->flags7 & MF7_HITTARGET) mo->target = target;
|
||||||
if (mo->flags7 & MF7_HITMASTER) mo->master = target;
|
if (mo->flags7 & MF7_HITMASTER) mo->master = target;
|
||||||
if (mo->flags7 & MF7_HITTRACER) mo->tracer = target;
|
if (mo->flags7 & MF7_HITTRACER) mo->tracer = target;
|
||||||
|
if ((target->flags & (MF_SHOOTABLE | MF_CORPSE)) || (target->flags6 & MF6_KILLED))
|
||||||
|
{
|
||||||
if (target->flags & MF_NOBLOOD) nextstate = mo->FindState(NAME_Crash);
|
if (target->flags & MF_NOBLOOD) nextstate = mo->FindState(NAME_Crash);
|
||||||
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death, NAME_Extreme);
|
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death, NAME_Extreme);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death);
|
if (nextstate == NULL) nextstate = mo->FindState(NAME_Death);
|
||||||
|
|
||||||
if (line != NULL && line->special == Line_Horizon && !(mo->flags3 & MF3_SKYEXPLODE))
|
if (line != NULL && line->special == Line_Horizon && !(mo->flags3 & MF3_SKYEXPLODE))
|
||||||
|
|
Loading…
Reference in a new issue