diff --git a/src/b_bot.c b/src/b_bot.c index ce7807321..d3fc25aa6 100644 --- a/src/b_bot.c +++ b/src/b_bot.c @@ -336,7 +336,20 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm // ******** // Thinkfly overlay - // doing this later :P + if (thinkfly) + { + if (overlay == NULL) + { + overlay = P_SpawnMobjFromMobj(tails, 0, 0, 0, MT_OVERLAY); + P_SetTarget(&overlay->target, tails); + P_SetMobjState(overlay, S_FLIGHTINDICATOR); + } + } + else if (overlay != NULL) + { + P_RemoveMobj(overlay); + overlay = NULL; + } // Turn the virtual keypresses into ticcmd_t. B_KeysToTiccmd(tails, cmd, forward, backward, left, right, false, false, jump, spin); diff --git a/src/dehacked.c b/src/dehacked.c index fff9dbee8..cce596289 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7139,6 +7139,8 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_FOUR2", "S_FIVE2", + "S_FLIGHTINDICATOR", + "S_LOCKON1", "S_LOCKON2", "S_LOCKON3", diff --git a/src/hardware/hw_light.c b/src/hardware/hw_light.c index 491cb739f..09545f28f 100644 --- a/src/hardware/hw_light.c +++ b/src/hardware/hw_light.c @@ -505,6 +505,7 @@ light_t *t_lspr[NUMSPRITES] = // Game Indicators &lspr[NOLIGHT], // SPR_SCOR &lspr[NOLIGHT], // SPR_DRWN + &lspr[NOLIGHT], // SPR_FLII &lspr[NOLIGHT], // SPR_LCKN &lspr[NOLIGHT], // SPR_TTAG &lspr[NOLIGHT], // SPR_GFLG diff --git a/src/info.c b/src/info.c index ed29fe2bf..125babd7d 100644 --- a/src/info.c +++ b/src/info.c @@ -402,6 +402,7 @@ char sprnames[NUMSPRITES + 1][5] = // Game Indicators "SCOR", // Score logo "DRWN", // Drowning Timer + "FLII", // Flight indicator "LCKN", // Target "TTAG", // Tag Sign "GFLG", // Got Flag sign @@ -3319,6 +3320,9 @@ state_t states[NUMSTATES] = {SPR_DRWN, 10, 40, {NULL}, 0, 0, S_NULL}, // S_FOUR2 {SPR_DRWN, 11, 40, {NULL}, 0, 0, S_NULL}, // S_FIVE2 + // Flight indicator + {SPR_FLII, FF_FULLBRIGHT|FF_ANIMATE|0, -1, {NULL}, 4, 4, S_NULL}, // S_FLIGHTINDICATOR + {SPR_LCKN, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_LOCKON1 {SPR_LCKN, 1|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_LOCKON2 {SPR_LCKN, 2|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_LOCKON3 diff --git a/src/info.h b/src/info.h index bbb6a21fc..16e535384 100644 --- a/src/info.h +++ b/src/info.h @@ -664,6 +664,7 @@ typedef enum sprite // Game Indicators SPR_SCOR, // Score logo SPR_DRWN, // Drowning Timer + SPR_FLII, // AI flight indicator SPR_LCKN, // Target SPR_TTAG, // Tag Sign SPR_GFLG, // Got Flag sign @@ -3454,6 +3455,8 @@ typedef enum state S_FOUR2, S_FIVE2, + S_FLIGHTINDICATOR, + S_LOCKON1, S_LOCKON2, S_LOCKON3,