A bunch of spectator-joining-round tweaks.

* Re-enable the flashing-set thing on attempting to join with the item key. I spoke to Sal privately about this - turns out some keys ALWAYS send key presses instead of only sending one, and shift - what I have item bound to - is one of the problematic ones.
* Make the no-joining-game-after-20-seconds thing happen 20 seconds after the TIMER has started, not the level (ie, take starttime into account)
This commit is contained in:
toaster 2018-10-18 18:13:00 +01:00
parent 1f1ba26aa7
commit 9db5e6a330
3 changed files with 5 additions and 3 deletions

View file

@ -5339,7 +5339,7 @@ void K_CheckSpectateStatus(void)
return;
if (numingame < 2 || leveltime < starttime || mapreset) // Allow if the match hasn't started yet
continue;
if (leveltime > 20*TICRATE) // DON'T allow if the match is 20 seconds in
if (leveltime > (starttime + 20*TICRATE)) // DON'T allow if the match is 20 seconds in
return;
if (G_RaceGametype() && players[i].laps) // DON'T allow if the race is at 2 laps
return;

View file

@ -9150,7 +9150,7 @@ void P_PlayerThink(player_t *player)
if ((netgame || splitscreen) && player->spectator && cmd->buttons & BT_ATTACK && !player->powers[pw_flashing])
{
player->pflags ^= PF_WANTSTOJOIN;
//player->powers[pw_flashing] = TICRATE + 1;
player->powers[pw_flashing] = TICRATE/2 + 1;
/*if (P_SpectatorJoinGame(player))
return; // player->mo was removed.*/
}

View file

@ -1953,7 +1953,9 @@ static void ST_overlayDrawer(void)
{
// SRB2kart: changed positions & text
V_DrawString(2, BASEVIDHEIGHT-40, V_HUDTRANSHALF|V_YELLOWMAP, M_GetText("- SPECTATING -"));
if (stplyr->pflags & PF_WANTSTOJOIN)
if (stplyr->powers[pw_flashing])
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - . . ."));
else if (stplyr->pflags & PF_WANTSTOJOIN)
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - Cancel Join"));
/*else if (G_GametypeHasTeams())
V_DrawString(2, BASEVIDHEIGHT-30, V_HUDTRANSHALF, M_GetText("Item - Join Team"));*/