summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cgame/cg_local.h5
-rw-r--r--src/cgame/cg_players.c40
-rw-r--r--src/game/g_client.c22
-rw-r--r--src/game/g_cmds.c4
-rw-r--r--src/game/g_local.h7
5 files changed, 8 insertions, 70 deletions
diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h
index 5d296fe0..423a0fa7 100644
--- a/src/cgame/cg_local.h
+++ b/src/cgame/cg_local.h
@@ -724,9 +724,6 @@ typedef struct
char name[ MAX_QPATH ];
team_t team;
-
- vec3_t color1;
- vec3_t color2;
int score; // updated by score servercmds
int location; // location index for team mode
@@ -734,8 +731,6 @@ typedef struct
int upgrade;
int curWeaponClass; // sends current weapon for H, current class for A
- int handicap;
-
// when clientinfo is changed, the loading of models/skins/sounds
// can be deferred until you are dead, to prevent hitches in
// gameplay
diff --git a/src/cgame/cg_players.c b/src/cgame/cg_players.c
index d22a87d8..f3553035 100644
--- a/src/cgame/cg_players.c
+++ b/src/cgame/cg_players.c
@@ -487,35 +487,6 @@ static qboolean CG_RegisterClientModelname( clientInfo_t *ci, const char *modelN
return qtrue;
}
-/*
-====================
-CG_ColorFromString
-====================
-*/
-static void CG_ColorFromString( const char *v, vec3_t color )
-{
- int val;
-
- VectorClear( color );
-
- val = atoi( v );
-
- if( val < 1 || val > 7 )
- {
- VectorSet( color, 1, 1, 1 );
- return;
- }
-
- if( val & 1 )
- color[ 2 ] = 1.0f;
-
- if( val & 2 )
- color[ 1 ] = 1.0f;
-
- if( val & 4 )
- color[ 0 ] = 1.0f;
-}
-
/*
===================
@@ -786,17 +757,6 @@ void CG_NewClientInfo( int clientNum )
v = Info_ValueForKey( configstring, "n" );
Q_strncpyz( newInfo.name, v, sizeof( newInfo.name ) );
- // colors
- v = Info_ValueForKey( configstring, "c1" );
- CG_ColorFromString( v, newInfo.color1 );
-
- v = Info_ValueForKey( configstring, "c2" );
- CG_ColorFromString( v, newInfo.color2 );
-
- // handicap
- v = Info_ValueForKey( configstring, "hc" );
- newInfo.handicap = atoi( v );
-
// team
v = Info_ValueForKey( configstring, "t" );
newInfo.team = atoi( v );
diff --git a/src/game/g_client.c b/src/game/g_client.c
index 58238880..3bbdb754 100644
--- a/src/game/g_client.c
+++ b/src/game/g_client.c
@@ -974,7 +974,6 @@ if desired.
void ClientUserinfoChanged( int clientNum )
{
gentity_t *ent;
- int health;
char *s;
char model[ MAX_QPATH ];
char buffer[ MAX_QPATH ];
@@ -984,8 +983,6 @@ void ClientUserinfoChanged( int clientNum )
char err[ MAX_STRING_CHARS ];
qboolean revertName = qfalse;
gclient_t *client;
- char c1[ MAX_INFO_STRING ];
- char c2[ MAX_INFO_STRING ];
char userinfo[ MAX_INFO_STRING ];
ent = g_entities + clientNum;
@@ -1069,10 +1066,6 @@ void ClientUserinfoChanged( int clientNum )
G_namelog_update_name( client );
}
- // set max health
- health = atoi( Info_ValueForKey( userinfo, "handicap" ) );
- client->pers.maxHealth = health;
-
if( client->pers.classSelection == PCL_NONE )
{
//This looks hacky and frankly it is. The clientInfo string needs to hold different
@@ -1152,10 +1145,6 @@ void ClientUserinfoChanged( int clientNum )
else
client->pers.useUnlagged = qfalse;
- // colors
- strcpy( c1, Info_ValueForKey( userinfo, "color1" ) );
- strcpy( c2, Info_ValueForKey( userinfo, "color2" ) );
-
Q_strncpyz( client->pers.voice, Info_ValueForKey( userinfo, "voice" ),
sizeof( client->pers.voice ) );
@@ -1163,10 +1152,9 @@ void ClientUserinfoChanged( int clientNum )
// print scoreboards, display models, and play custom sounds
Com_sprintf( userinfo, sizeof( userinfo ),
- "n\\%s\\t\\%i\\model\\%s\\c1\\%s\\c2\\%s\\"
- "hc\\%i\\ig\\%16s\\v\\%s",
- client->pers.netname, client->pers.teamSelection, model, c1, c2,
- client->pers.maxHealth, Com_ClientListString( &client->sess.ignoreList ),
+ "n\\%s\\t\\%i\\model\\%s\\ig\\%16s\\v\\%s",
+ client->pers.netname, client->pers.teamSelection, model,
+ Com_ClientListString( &client->sess.ignoreList ),
client->pers.voice );
trap_SetConfigstring( CS_PLAYERS + clientNum, userinfo );
@@ -1503,10 +1491,10 @@ void ClientSpawn( gentity_t *ent, gentity_t *spawn, vec3_t origin, vec3_t angles
BG_ClassBoundingBox( ent->client->pers.classSelection, ent->r.mins, ent->r.maxs, NULL, NULL, NULL );
if( client->sess.spectatorState == SPECTATOR_NOT )
- client->pers.maxHealth = client->ps.stats[ STAT_MAX_HEALTH ] =
+ client->ps.stats[ STAT_MAX_HEALTH ] =
BG_Class( ent->client->pers.classSelection )->health;
else
- client->pers.maxHealth = client->ps.stats[ STAT_MAX_HEALTH ] = 100;
+ client->ps.stats[ STAT_MAX_HEALTH ] = 100;
// clear entity values
if( ent->client->pers.classSelection == PCL_HUMAN )
diff --git a/src/game/g_cmds.c b/src/game/g_cmds.c
index 431434c2..5f574f20 100644
--- a/src/game/g_cmds.c
+++ b/src/game/g_cmds.c
@@ -986,7 +986,7 @@ void Cmd_CallVote_f( gentity_t *ent )
level.voteThreshold[ team ] = 50;
if( g_voteLimit.integer > 0 &&
- ent->client->pers.voteCount >= g_voteLimit.integer &&
+ ent->client->pers.namelog->voteCount >= g_voteLimit.integer &&
!G_admin_permission( ent, ADMF_NO_VOTE_LIMIT ) )
{
trap_SendServerCommand( ent-g_entities, va(
@@ -1257,7 +1257,7 @@ void Cmd_CallVote_f( gentity_t *ent )
trap_SetConfigstring( CS_VOTE_STRING + team,
level.voteDisplayString[ team ] );
- ent->client->pers.voteCount++;
+ ent->client->pers.namelog->voteCount++;
ent->client->pers.vote[ team ] = qtrue;
G_Vote( ent, team, qtrue );
}
diff --git a/src/game/g_local.h b/src/game/g_local.h
index 600ea8a0..0a895820 100644
--- a/src/game/g_local.h
+++ b/src/game/g_local.h
@@ -286,6 +286,7 @@ typedef struct namelog_s
int nameChangeTime;
int nameChanges;
+ int voteCount;
qboolean muted;
qboolean denyBuild;
@@ -302,14 +303,11 @@ typedef struct
clientConnected_t connected;
usercmd_t cmd; // we would lose angles if not persistant
qboolean localClient; // true if "ip" info key is "localhost"
- qboolean initialSpawn; // the first spawn should be at a cool location
qboolean stickySpec; // don't stop spectating a player after they get killed
qboolean pmoveFixed; //
char netname[ MAX_NAME_LENGTH ];
- int maxHealth; // for handicapping
int enterTime; // level.time the client entered the game
int location; // player locations
- int voteCount; // to prevent people from constantly calling votes
qboolean teamInfo; // send team overlay updates?
float flySpeed; // for spectator/noclip moves
qboolean disableBlueprintErrors; // should the buildable blueprint never be hidden from the players?
@@ -324,9 +322,6 @@ typedef struct
int aliveSeconds; // time player has been alive in seconds
- int nameChangeTime;
- int nameChanges;
-
// used to save persistant[] values while in SPECTATOR_FOLLOW mode
int credit;