summaryrefslogtreecommitdiff
path: root/src/server/user.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/user.c')
-rw-r--r--src/server/user.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/user.c b/src/server/user.c
index 66f2ac7..8292795 100644
--- a/src/server/user.c
+++ b/src/server/user.c
@@ -993,6 +993,11 @@ static void SV_ExecuteUserCommand(const char *s)
}
}
+ if (!strcmp(c, "say") || !strcmp(c, "say_team")) {
+ // don't timeout. only chat commands count as activity.
+ sv_client->lastactivity = svs.realtime;
+ }
+
ge->ClientCommand(sv_player);
}
@@ -1015,6 +1020,8 @@ SV_ClientThink
*/
static inline void SV_ClientThink(usercmd_t *cmd)
{
+ usercmd_t *old = &sv_client->lastcmd;
+
sv_client->command_msec -= cmd->msec;
sv_client->num_moves++;
@@ -1024,6 +1031,14 @@ static inline void SV_ClientThink(usercmd_t *cmd)
return;
}
+ if (cmd->buttons != old->buttons
+ || cmd->forwardmove != old->forwardmove
+ || cmd->sidemove != old->sidemove
+ || cmd->upmove != old->upmove) {
+ // don't timeout
+ sv_client->lastactivity = svs.realtime;
+ }
+
ge->ClientThink(sv_player, cmd);
}