summaryrefslogtreecommitdiff
path: root/src/game
diff options
context:
space:
mode:
Diffstat (limited to 'src/game')
-rw-r--r--src/game/g_client.c22
-rw-r--r--src/game/g_cmds.c4
-rw-r--r--src/game/g_local.h7
3 files changed, 8 insertions, 25 deletions
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;