mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-04-05 09:21:15 +00:00
Flicky stand implementation by MTF_AMBUSH
* MTF_OBJECTSPECIAL: Set no gravity for flicky
This commit is contained in:
parent
d5f32cc0e5
commit
abbc7631cd
1 changed files with 22 additions and 2 deletions
|
@ -11040,7 +11040,17 @@ void A_FlickyCheck(mobj_t *actor)
|
|||
if (LUA_CallAction("A_FlickyCheck", actor))
|
||||
return;
|
||||
#endif
|
||||
if (locvar2 && P_MobjFlip(actor)*actor->momz < 1)
|
||||
if (actor->spawnpoint && (actor->spawnpoint->options & MTF_AMBUSH))
|
||||
{
|
||||
if (actor->spawnpoint->options & MTF_OBJECTSPECIAL)
|
||||
{
|
||||
actor->momz = 0;
|
||||
actor->flags |= MF_NOGRAVITY;
|
||||
}
|
||||
actor->flags |= MF_NOCLIP | MF_NOBLOCKMAP | MF_SCENERY;
|
||||
P_SetMobjState(actor, mobjinfo[actor->type].seestate);
|
||||
}
|
||||
else if (locvar2 && P_MobjFlip(actor)*actor->momz < 1)
|
||||
P_SetMobjState(actor, locvar2);
|
||||
else if (locvar1 && ((!(actor->eflags & MFE_VERTICALFLIP) && actor->z <= actor->floorz)
|
||||
|| ((actor->eflags & MFE_VERTICALFLIP) && actor->z + actor->height >= actor->ceilingz)))
|
||||
|
@ -11065,7 +11075,17 @@ void A_FlickyHeightCheck(mobj_t *actor)
|
|||
if (LUA_CallAction("A_FlickyHeightCheck", actor))
|
||||
return;
|
||||
#endif
|
||||
if (locvar1 && actor->target && P_MobjFlip(actor)*actor->momz < 1
|
||||
if (actor->spawnpoint && (actor->spawnpoint->options & MTF_AMBUSH))
|
||||
{
|
||||
if (actor->spawnpoint->options & MTF_OBJECTSPECIAL)
|
||||
{
|
||||
actor->momz = 0;
|
||||
actor->flags |= MF_NOGRAVITY;
|
||||
}
|
||||
actor->flags |= MF_NOCLIP | MF_NOBLOCKMAP | MF_SCENERY;
|
||||
P_SetMobjState(actor, mobjinfo[actor->type].seestate);
|
||||
}
|
||||
else if (locvar1 && actor->target && P_MobjFlip(actor)*actor->momz < 1
|
||||
&& ((P_MobjFlip(actor)*((actor->z + actor->height/2) - (actor->target->z + actor->target->height/2)) < locvar2)
|
||||
|| (actor->z - actor->height < actor->floorz) || (actor->z + 2*actor->height > actor->ceilingz)))
|
||||
P_SetMobjState(actor, locvar1);
|
||||
|
|
Loading…
Reference in a new issue