Make absolute sure spbplace is set in the right places

This commit is contained in:
TehRealSalt 2018-11-24 20:48:21 -05:00
parent d3fb778a52
commit 0a303dfde9

View file

@ -8469,7 +8469,11 @@ void A_SPBChase(mobj_t *actor)
else if (actor->extravalue1 == 2) // MODE: WAIT... else if (actor->extravalue1 == 2) // MODE: WAIT...
{ {
actor->momx = actor->momy = actor->momz = 0; // Stoooop actor->momx = actor->momy = actor->momz = 0; // Stoooop
if (actor->lastlook == -1)
spbplace = -1; spbplace = -1;
else
spbplace = players[actor->lastlook].kartstuff[k_position];
if (actor->extravalue2-- <= 0) if (actor->extravalue2-- <= 0)
{ {
@ -8487,7 +8491,6 @@ void A_SPBChase(mobj_t *actor)
else // MODE: SEEKING else // MODE: SEEKING
{ {
actor->lastlook = -1; // Just make sure this is reset actor->lastlook = -1; // Just make sure this is reset
spbplace = -1;
// Find the player with the best rank // Find the player with the best rank
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
@ -8511,6 +8514,8 @@ void A_SPBChase(mobj_t *actor)
} }
} }
spbplace = bestrank; // While seeking, it's trying to go for first place.
// No one there? // No one there?
if (player == NULL || !player->mo) if (player == NULL || !player->mo)
{ {