Merge branch 'tailsupbruhtonium' into 'master'
Tails Flight Indicator Bruh Moment Closes #331, #330, and #309 See merge request STJr/SRB2Internal!517
This commit is contained in:
commit
fa4c520ce0
18
src/b_bot.c
18
src/b_bot.c
|
@ -31,7 +31,6 @@ static boolean panic = false;
|
||||||
static UINT8 flymode = 0;
|
static UINT8 flymode = 0;
|
||||||
static boolean spinmode = false;
|
static boolean spinmode = false;
|
||||||
static boolean thinkfly = false;
|
static boolean thinkfly = false;
|
||||||
static mobj_t *overlay;
|
|
||||||
|
|
||||||
static inline void B_ResetAI(void)
|
static inline void B_ResetAI(void)
|
||||||
{
|
{
|
||||||
|
@ -336,17 +335,20 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
||||||
// Thinkfly overlay
|
// Thinkfly overlay
|
||||||
if (thinkfly)
|
if (thinkfly)
|
||||||
{
|
{
|
||||||
if (overlay == NULL)
|
if (!tails->target)
|
||||||
{
|
{
|
||||||
overlay = P_SpawnMobjFromMobj(tails, 0, 0, 0, MT_OVERLAY);
|
P_SetTarget(&tails->target, P_SpawnMobjFromMobj(tails, 0, 0, 0, MT_OVERLAY));
|
||||||
P_SetTarget(&overlay->target, tails);
|
if (tails->target)
|
||||||
P_SetMobjState(overlay, S_FLIGHTINDICATOR);
|
{
|
||||||
|
P_SetTarget(&tails->target->target, tails);
|
||||||
|
P_SetMobjState(tails->target, S_FLIGHTINDICATOR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (overlay != NULL)
|
else if (tails->target && tails->target->type == MT_OVERLAY && tails->target->state == states+S_FLIGHTINDICATOR)
|
||||||
{
|
{
|
||||||
P_RemoveMobj(overlay);
|
P_RemoveMobj(tails->target);
|
||||||
overlay = NULL;
|
P_SetTarget(&tails->target, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Turn the virtual keypresses into ticcmd_t.
|
// Turn the virtual keypresses into ticcmd_t.
|
||||||
|
|
Loading…
Reference in a new issue