diff options
author | Christopher Schwarz <lakitu7@gmail.com> | 2009-12-06 20:57:24 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:17:23 +0000 |
commit | 9040fbd03fee6f5d098abd49518a0a85ea9f65a2 (patch) | |
tree | 30e01c56fa62321990bd13d35c3816656aceeffa /src/game/g_active.c | |
parent | 27c26322272a10df75b28efd24e552d0a5e5cff0 (diff) |
* Fix votes failing when they shouldn't (Rezyn)
* Fix INACTIVITY flag (Rezyn)
* Fix being able to call a teamvote for someone not on your team (thanks Rezyn)
* Fix IMMUNITY flag (Rezyn)
* Fix there being 2 instances of g_dretchpunt in the cvar table (Rezyn)
Diffstat (limited to 'src/game/g_active.c')
-rw-r--r-- | src/game/g_active.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/game/g_active.c b/src/game/g_active.c index 619362ba..2c4b443a 100644 --- a/src/game/g_active.c +++ b/src/game/g_active.c @@ -512,8 +512,10 @@ ClientInactivityTimer Returns qfalse if the client is dropped ================= */ -qboolean ClientInactivityTimer( gclient_t *client ) +qboolean ClientInactivityTimer( gentity_t *ent ) { + gclient_t *client = ent->client; + if( ! g_inactivity.integer ) { // give everyone some time, so if the operator sets g_inactivity during @@ -531,13 +533,16 @@ qboolean ClientInactivityTimer( gclient_t *client ) } else if( !client->pers.localClient ) { - if( level.time > client->inactivityTime ) + if( level.time > client->inactivityTime && + !G_admin_permission( ent, ADMF_ACTIVITY ) ) { trap_DropClient( client - level.clients, "Dropped due to inactivity" ); return qfalse; } - if( level.time > client->inactivityTime - 10000 && !client->inactivityWarning ) + if( level.time > client->inactivityTime - 10000 && + !client->inactivityWarning && + !G_admin_permission( ent, ADMF_ACTIVITY ) ) { client->inactivityWarning = qtrue; trap_SendServerCommand( client - level.clients, "cp \"Ten seconds until inactivity drop!\n\"" ); @@ -1293,7 +1298,7 @@ void ClientThink_real( gentity_t *ent ) G_UpdatePTRConnection( client ); // check for inactivity timer, but never drop the local client of a non-dedicated server - if( !ClientInactivityTimer( client ) ) + if( !ClientInactivityTimer( ent ) ) return; // calculate where ent is currently seeing all the other active clients |