mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-01 14:10:54 +00:00
When NIGHTSDRONE z changes, change DRONEMAN z as well
This commit is contained in:
parent
79c042ca09
commit
0c8e1aa10a
1 changed files with 7 additions and 4 deletions
11
src/p_mobj.c
11
src/p_mobj.c
|
@ -7881,7 +7881,6 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
if (goalpost->destscale != mobj->destscale || goalpost->movefactor != mobj->z || flipchanged)
|
if (goalpost->destscale != mobj->destscale || goalpost->movefactor != mobj->z || flipchanged)
|
||||||
{
|
{
|
||||||
goalpost->destscale = sparkle->destscale = droneman->destscale = mobj->destscale;
|
goalpost->destscale = sparkle->destscale = droneman->destscale = mobj->destscale;
|
||||||
goalpost->movefactor = mobj->z;
|
|
||||||
|
|
||||||
// straight copy-pasta from P_SpawnMapThing, case MT_NIGHTSDRONE
|
// straight copy-pasta from P_SpawnMapThing, case MT_NIGHTSDRONE
|
||||||
if (!flip)
|
if (!flip)
|
||||||
|
@ -7937,6 +7936,11 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
|
|
||||||
P_TeleportMove(goalpost, mobj->x, mobj->y, mobj->z + goaloffset);
|
P_TeleportMove(goalpost, mobj->x, mobj->y, mobj->z + goaloffset);
|
||||||
P_TeleportMove(sparkle, mobj->x, mobj->y, mobj->z + sparkleoffset);
|
P_TeleportMove(sparkle, mobj->x, mobj->y, mobj->z + sparkleoffset);
|
||||||
|
if (goalpost->movefactor != mobj->z)
|
||||||
|
{
|
||||||
|
P_TeleportMove(droneman, mobj->x, mobj->y, mobj->z + dronemanoffset);
|
||||||
|
goalpost->movefactor = mobj->z;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if (goalpost->x != mobj->x || goalpost->y != mobj->y)
|
else if (goalpost->x != mobj->x || goalpost->y != mobj->y)
|
||||||
{
|
{
|
||||||
|
@ -7945,11 +7949,10 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (droneman->x != mobj->x || droneman->y != mobj->y)
|
if (droneman->x != mobj->x || droneman->y != mobj->y)
|
||||||
{
|
// More complex changes like Z, gravity, and flags are handled earlier.
|
||||||
// we just care about x/y positioning; z takes care of itself
|
// Here, we just care if only X/Y changes.
|
||||||
P_TeleportMove(droneman, mobj->x, mobj->y,
|
P_TeleportMove(droneman, mobj->x, mobj->y,
|
||||||
droneman->z >= mobj->floorz && droneman->z <= mobj->ceilingz ? droneman->z : mobj->z);
|
droneman->z >= mobj->floorz && droneman->z <= mobj->ceilingz ? droneman->z : mobj->z);
|
||||||
}
|
|
||||||
|
|
||||||
// now toggle states!
|
// now toggle states!
|
||||||
// GOAL mode?
|
// GOAL mode?
|
||||||
|
|
Loading…
Reference in a new issue