summaryrefslogtreecommitdiff
path: root/src/game/g_session.c
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-03 11:41:24 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:15:14 +0000
commit614a658030e59212335611596adb196b93e5b437 (patch)
treeb627256cb9b7f4d8c55490111a149d059da5053d /src/game/g_session.c
parentea433462e65a861b7123942151e882954f55f052 (diff)
* Merge clientSession_t::sessionTeam and clientSession_t::spectatorState
* Remove existing team_t (TEAM_FREE, TEAM_SPECTATOR) * s/pTeam_t/team_t/;s/buildableTeam_t/team_t/;s/WUTeam_t/team_t/ * s/pClass_t/class_t/ * s/PERS_TEAM/PERS_SPECSTATE/ * s/STAT_PTEAM/STAT_TEAM/;s/STAT_PCLASS/STAT_CLASS/
Diffstat (limited to 'src/game/g_session.c')
-rw-r--r--src/game/g_session.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/game/g_session.c b/src/game/g_session.c
index 66ac9980..c5b517ab 100644
--- a/src/game/g_session.c
+++ b/src/game/g_session.c
@@ -46,14 +46,10 @@ void G_WriteClientSessionData( gclient_t *client )
const char *s;
const char *var;
- s = va( "%i %i %i %i %i %i %i %s",
- client->sess.sessionTeam,
+ s = va( "%i %i %i %s",
client->sess.spectatorTime,
client->sess.spectatorState,
client->sess.spectatorClient,
- client->sess.wins,
- client->sess.losses,
- client->sess.teamLeader,
BG_ClientListString( &client->sess.ignoreList )
);
@@ -73,30 +69,22 @@ void G_ReadSessionData( gclient_t *client )
{
char s[ MAX_STRING_CHARS ];
const char *var;
- int teamLeader;
int spectatorState;
- int sessionTeam;
var = va( "session%i", client - level.clients );
trap_Cvar_VariableStringBuffer( var, s, sizeof(s) );
// FIXME: should be using BG_ClientListParse() for ignoreList, but
// bg_lib.c's sscanf() currently lacks %s
- sscanf( s, "%i %i %i %i %i %i %i %x%x",
- &sessionTeam,
+ sscanf( s, "%i %i %i %x%x",
&client->sess.spectatorTime,
&spectatorState,
&client->sess.spectatorClient,
- &client->sess.wins,
- &client->sess.losses,
- &teamLeader,
&client->sess.ignoreList.hi,
&client->sess.ignoreList.lo
);
- client->sess.sessionTeam = (team_t)sessionTeam;
client->sess.spectatorState = (spectatorState_t)spectatorState;
- client->sess.teamLeader = (qboolean)teamLeader;
}
@@ -119,15 +107,15 @@ void G_InitSessionData( gclient_t *client, char *userinfo )
if( value[ 0 ] == 's' )
{
// a willing spectator, not a waiting-in-line
- sess->sessionTeam = TEAM_SPECTATOR;
+ sess->spectatorState = SPECTATOR_FREE;
}
else
{
if( g_maxGameClients.integer > 0 &&
level.numNonSpectatorClients >= g_maxGameClients.integer )
- sess->sessionTeam = TEAM_SPECTATOR;
+ sess->spectatorState = SPECTATOR_FREE;
else
- sess->sessionTeam = TEAM_FREE;
+ sess->spectatorState = SPECTATOR_NOT;
}
sess->spectatorState = SPECTATOR_FREE;