mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-02-08 09:12:24 +00:00
A_OrbitNights make actor scale to target
* Added `donotrescale` input to disable this behavior * Reverted previous commit changes for scaling Ideya because unneeded
This commit is contained in:
parent
aecabb246d
commit
43b790c26f
3 changed files with 8 additions and 12 deletions
|
@ -8544,12 +8544,14 @@ void A_ToggleFlameJet(mobj_t* actor)
|
||||||
// var1 = Angle adjustment (aka orbit speed)
|
// var1 = Angle adjustment (aka orbit speed)
|
||||||
// var2:
|
// var2:
|
||||||
// Lower 16 bits: height offset
|
// Lower 16 bits: height offset
|
||||||
// Upper 16 bits: set if object is Nightopian Helper
|
// Bits 17-20: set if object is Nightopian Helper
|
||||||
|
// Bits 21-24: set to not sync scale to player
|
||||||
//
|
//
|
||||||
void A_OrbitNights(mobj_t* actor)
|
void A_OrbitNights(mobj_t* actor)
|
||||||
{
|
{
|
||||||
INT32 ofs = (var2 & 0xFFFF);
|
INT32 ofs = (var2 & 0xFFFF);
|
||||||
boolean ishelper = var2 >> 16;
|
boolean ishelper = (var2 & 0xF0000);
|
||||||
|
boolean donotrescale = (var2 & 0xF00000);
|
||||||
#ifdef HAVE_BLUA
|
#ifdef HAVE_BLUA
|
||||||
if (LUA_CallAction("A_OrbitNights", actor))
|
if (LUA_CallAction("A_OrbitNights", actor))
|
||||||
return;
|
return;
|
||||||
|
@ -8594,6 +8596,9 @@ void A_OrbitNights(mobj_t* actor)
|
||||||
else
|
else
|
||||||
actor->flags2 &= ~MF2_DONTDRAW;
|
actor->flags2 &= ~MF2_DONTDRAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!donotrescale && actor->destscale != actor->target->destscale)
|
||||||
|
actor->destscale = actor->target->destscale;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -807,8 +807,6 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
||||||
P_SetTarget(&orbittarget->hnext->target, orbittarget); // goalpost
|
P_SetTarget(&orbittarget->hnext->target, orbittarget); // goalpost
|
||||||
P_SetTarget(&toucher->tracer, NULL);
|
P_SetTarget(&toucher->tracer, NULL);
|
||||||
|
|
||||||
orbittarget->hnext->destscale = orbittarget->destscale;
|
|
||||||
|
|
||||||
if (hnext)
|
if (hnext)
|
||||||
{
|
{
|
||||||
orbittarget->hnext->extravalue1 = (angle_t)(hnext->extravalue1 - 72*ANG1);
|
orbittarget->hnext->extravalue1 = (angle_t)(hnext->extravalue1 - 72*ANG1);
|
||||||
|
|
|
@ -7882,15 +7882,8 @@ void P_MobjThinker(mobj_t *mobj)
|
||||||
|| goalpost->movefactor != mobj->z
|
|| goalpost->movefactor != mobj->z
|
||||||
|| flipchanged
|
|| flipchanged
|
||||||
|| goalpost->threshold != (mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE)))
|
|| goalpost->threshold != (mobj->flags & (MF_SLIDEME | MF_GRENADEBOUNCE)))
|
||||||
{
|
|
||||||
if (goalpost->destscale != mobj->destscale)
|
|
||||||
{
|
{
|
||||||
goalpost->destscale = sparkle->destscale = droneman->destscale = mobj->destscale;
|
goalpost->destscale = sparkle->destscale = droneman->destscale = mobj->destscale;
|
||||||
// get the orbiting ideyas and scale them too
|
|
||||||
mobj_t *hnext = goalpost;
|
|
||||||
while ((hnext = hnext->hnext))
|
|
||||||
hnext->destscale = mobj->destscale;
|
|
||||||
}
|
|
||||||
|
|
||||||
// straight copy-pasta from P_SpawnMapThing, case MT_NIGHTSDRONE
|
// straight copy-pasta from P_SpawnMapThing, case MT_NIGHTSDRONE
|
||||||
if (!flip)
|
if (!flip)
|
||||||
|
|
Loading…
Reference in a new issue