mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-05-04 07:52:22 +00:00
Make Drone visual elements react to height change
This commit is contained in:
parent
3170d31708
commit
539c323838
1 changed files with 4 additions and 1 deletions
|
|
@ -7880,6 +7880,7 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
|
|
||||||
if (goalpost->destscale != mobj->destscale
|
if (goalpost->destscale != mobj->destscale
|
||||||
|| goalpost->movefactor != mobj->z
|
|| goalpost->movefactor != mobj->z
|
||||||
|
|| goalpost->friction != mobj->height
|
||||||
|| flipchanged
|
|| flipchanged
|
||||||
|| goalpost->threshold != (mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE)))
|
|| goalpost->threshold != (mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE)))
|
||||||
{
|
{
|
||||||
|
|
@ -7939,10 +7940,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)
|
if (goalpost->movefactor != mobj->z || goalpost->friction != mobj->height)
|
||||||
{
|
{
|
||||||
P_TeleportMove(droneman, mobj->x, mobj->y, mobj->z + dronemanoffset);
|
P_TeleportMove(droneman, mobj->x, mobj->y, mobj->z + dronemanoffset);
|
||||||
goalpost->movefactor = mobj->z;
|
goalpost->movefactor = mobj->z;
|
||||||
|
goalpost->friction = mobj->height;
|
||||||
}
|
}
|
||||||
goalpost->threshold = mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE);
|
goalpost->threshold = mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE);
|
||||||
}
|
}
|
||||||
|
|
@ -10790,6 +10792,7 @@ ML_EFFECT4 : Don't clip inside the ground
|
||||||
|
|
||||||
// Remember old Z position and flags for correction detection
|
// Remember old Z position and flags for correction detection
|
||||||
goalpost->movefactor = mobj->z;
|
goalpost->movefactor = mobj->z;
|
||||||
|
goalpost->friction = mobj->height;
|
||||||
goalpost->threshold = mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE);
|
goalpost->threshold = mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue