diff options
author | Tim Angus <tim@ngus.net> | 2005-10-03 20:52:19 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2005-10-03 20:52:19 +0000 |
commit | 57a17f003806d9326b64317babf866d6111c0abb (patch) | |
tree | 9783aa743a70eadc3c2e6d88117d145d6d1ba3cb /src/game/g_session.c | |
parent | e6f475ab2290ff7bc847336ed1f211f2092ac602 (diff) |
* Removed jump pad code (and associated media loading)
* Removed loading of some Q3 cruft
* Spilled events attached to temporary entities are now reattached to their
original entities, fixing the missing flame bug
* Fixed "suicide god" bug
* Fixed bug where zap ignores armour
* Fixed missing particle systems when follow-spectating
* Fixed potential bug involving dodgy pointer arithmetic in CG_LoadClientInfo
* Cleaned up logic in CG_AddPlayerWeapon
* MASK_SHOT traces no longer collide with corpses
* Corpses timeout in 20 seconds instead of 60
* Improved robustness of spawn validation, fixing the bug on transit
* A crapload of whitespace fixes
Diffstat (limited to 'src/game/g_session.c')
-rw-r--r-- | src/game/g_session.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/src/game/g_session.c b/src/game/g_session.c index d05e81e1..1dcb8883 100644 --- a/src/game/g_session.c +++ b/src/game/g_session.c @@ -36,22 +36,22 @@ Called on game shutdown */ void G_WriteClientSessionData( gclient_t *client ) { - const char *s; - const char *var; - - s = va( "%i %i %i %i %i %i %i", - client->sess.sessionTeam, - client->sess.spectatorTime, - client->sess.spectatorState, - client->sess.spectatorClient, - client->sess.wins, - client->sess.losses, + const char *s; + const char *var; + + s = va( "%i %i %i %i %i %i %i", + client->sess.sessionTeam, + client->sess.spectatorTime, + client->sess.spectatorState, + client->sess.spectatorClient, + client->sess.wins, + client->sess.losses, client->sess.teamLeader - ); + ); - var = va( "session%i", client - level.clients ); + var = va( "session%i", client - level.clients ); - trap_Cvar_Set( var, s ); + trap_Cvar_Set( var, s ); } /* @@ -63,26 +63,26 @@ Called on a reconnect */ void G_ReadSessionData( gclient_t *client ) { - char s[ MAX_STRING_CHARS ]; - const char *var; + char s[ MAX_STRING_CHARS ]; + const char *var; // bk001205 - format int teamLeader; int spectatorState; int sessionTeam; - var = va( "session%i", client - level.clients ); - trap_Cvar_VariableStringBuffer( var, s, sizeof(s) ); + var = va( "session%i", client - level.clients ); + trap_Cvar_VariableStringBuffer( var, s, sizeof(s) ); - sscanf( s, "%i %i %i %i %i %i %i", - &sessionTeam, - &client->sess.spectatorTime, - &spectatorState, - &client->sess.spectatorClient, - &client->sess.wins, - &client->sess.losses, + sscanf( s, "%i %i %i %i %i %i %i", + &sessionTeam, + &client->sess.spectatorTime, + &spectatorState, + &client->sess.spectatorClient, + &client->sess.wins, + &client->sess.losses, &teamLeader - ); + ); // bk001205 - format issues client->sess.sessionTeam = (team_t)sessionTeam; @@ -100,12 +100,12 @@ Called on a first-time connect */ void G_InitSessionData( gclient_t *client, char *userinfo ) { - clientSession_t *sess; - const char *value; + clientSession_t *sess; + const char *value; - sess = &client->sess; + sess = &client->sess; - // initial team determination + // initial team determination value = Info_ValueForKey( userinfo, "team" ); if( value[ 0 ] == 's' ) { @@ -114,18 +114,18 @@ void G_InitSessionData( gclient_t *client, char *userinfo ) } else { - if( g_maxGameClients.integer > 0 && + if( g_maxGameClients.integer > 0 && level.numNonSpectatorClients >= g_maxGameClients.integer ) sess->sessionTeam = TEAM_SPECTATOR; else sess->sessionTeam = TEAM_FREE; } - sess->spectatorState = SPECTATOR_FREE; - sess->spectatorTime = level.time; + sess->spectatorState = SPECTATOR_FREE; + sess->spectatorTime = level.time; sess->spectatorClient = -1; - G_WriteClientSessionData( client ); + G_WriteClientSessionData( client ); } @@ -137,14 +137,14 @@ G_WriteSessionData */ void G_WriteSessionData( void ) { - int i; + int i; //TA: ? - trap_Cvar_Set( "session", va( "%i", 0 ) ); + trap_Cvar_Set( "session", va( "%i", 0 ) ); - for( i = 0 ; i < level.maxclients ; i++ ) + for( i = 0 ; i < level.maxclients ; i++ ) { - if( level.clients[ i ].pers.connected == CON_CONNECTED ) - G_WriteClientSessionData( &level.clients[ i ] ); - } + if( level.clients[ i ].pers.connected == CON_CONNECTED ) + G_WriteClientSessionData( &level.clients[ i ] ); + } } |