mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-01-11 09:12:22 +00:00
Thing_StartTracking: Make it do something
Instead of using a linedef executor tag as an argument, apply an action special to the angle manager object that you had to place anyways. There is no UDMF version check because the old behavior was practically unusable.
This commit is contained in:
parent
a7aaf0eddb
commit
a2ddd5079e
2 changed files with 3 additions and 11 deletions
|
|
@ -6790,12 +6790,8 @@ static void P_TracerAngleThink(mobj_t *mobj)
|
|||
if (!mobj->tracer)
|
||||
return;
|
||||
|
||||
if (!mobj->extravalue2)
|
||||
return;
|
||||
|
||||
// mobj->lastlook - Don't disable behavior after first failure
|
||||
// mobj->extravalue1 - Angle tolerance
|
||||
// mobj->extravalue2 - Exec tag upon failure
|
||||
// mobj->cvval - Allowable failure delay
|
||||
// mobj->cvmem - Failure timer
|
||||
|
||||
|
|
@ -6818,8 +6814,6 @@ static void P_TracerAngleThink(mobj_t *mobj)
|
|||
mobj->cvmem--;
|
||||
else
|
||||
{
|
||||
INT32 exectag = mobj->extravalue2; // remember this before we erase the values
|
||||
|
||||
if (mobj->lastlook)
|
||||
mobj->cvmem = mobj->cusval; // reset timer for next failure
|
||||
else
|
||||
|
|
@ -6829,7 +6823,7 @@ static void P_TracerAngleThink(mobj_t *mobj)
|
|||
mobj->lastlook = mobj->extravalue1 = mobj->extravalue2 = mobj->cvmem = mobj->cusval = 0;
|
||||
}
|
||||
|
||||
P_LinedefExecute(exectag, mobj, NULL);
|
||||
P_ActivateThingSpecial(mobj->tracer, mobj);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
|
|
@ -4156,8 +4156,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
{
|
||||
INT32 failureangle = FixedAngle((min(max(abs(args[1]), 0), 360))*FRACUNIT);
|
||||
INT32 failuredelay = abs(args[2]);
|
||||
INT32 failureexectag = args[3];
|
||||
boolean persist = !!(args[4]);
|
||||
boolean persist = !!(args[3]);
|
||||
mobj_t *anchormo;
|
||||
|
||||
anchormo = P_FindObjectTypeFromTag(MT_ANGLEMAN, args[0]);
|
||||
|
|
@ -4168,7 +4167,6 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
P_SetTarget(&mo->tracer, anchormo);
|
||||
mo->lastlook = persist; // don't disable behavior after first failure
|
||||
mo->extravalue1 = failureangle; // angle to exceed for failure state
|
||||
mo->extravalue2 = failureexectag; // exec tag for failure state (angle is not within range)
|
||||
mo->cusval = mo->cvmem = failuredelay; // cusval = tics to allow failure before line trigger; cvmem = decrement timer
|
||||
}
|
||||
break;
|
||||
|
|
@ -4178,7 +4176,7 @@ boolean P_ProcessSpecial(activator_t *activator, INT16 special, INT32 *args, cha
|
|||
{
|
||||
mo->eflags &= ~MFE_TRACERANGLE;
|
||||
P_SetTarget(&mo->tracer, NULL);
|
||||
mo->lastlook = mo->cvmem = mo->cusval = mo->extravalue1 = mo->extravalue2 = 0;
|
||||
mo->lastlook = mo->cvmem = mo->cusval = mo->extravalue1 = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue