mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-21 12:01:05 +00:00
Merge branch 'fix-lastinputtime-not-incrementing' into 'next'
Fix lastinputtime not incrementing if idletime is 0 See merge request STJr/SRB2!2494
This commit is contained in:
commit
a24c8a95e7
1 changed files with 3 additions and 3 deletions
|
@ -1361,16 +1361,16 @@ static void IdleUpdate(void)
|
|||
if (!server || !netgame)
|
||||
return;
|
||||
|
||||
for (i = 1; i < MAXPLAYERS; i++)
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (cv_idletime.value && playeringame[i] && playernode[i] != UINT8_MAX && !players[i].quittime && !players[i].spectator && !players[i].bot && !IsPlayerAdmin(i) && i != serverplayer && gamestate == GS_LEVEL && !(players[i].pflags & PF_FINISHED))
|
||||
if (playeringame[i] && playernode[i] != UINT8_MAX && !players[i].quittime && !players[i].spectator && !players[i].bot && gamestate == GS_LEVEL)
|
||||
{
|
||||
if (players[i].cmd.forwardmove || players[i].cmd.sidemove || players[i].cmd.buttons)
|
||||
players[i].lastinputtime = 0;
|
||||
else
|
||||
players[i].lastinputtime++;
|
||||
|
||||
if (players[i].lastinputtime > (tic_t)cv_idletime.value * TICRATE * 60)
|
||||
if (cv_idletime.value && !IsPlayerAdmin(i) && i != serverplayer && !(players[i].pflags & PF_FINISHED) && players[i].lastinputtime > (tic_t)cv_idletime.value * TICRATE * 60)
|
||||
{
|
||||
players[i].lastinputtime = 0;
|
||||
if (cv_idlespectate.value && G_GametypeHasSpectators())
|
||||
|
|
Loading…
Reference in a new issue