Added the skin and model names to the name of the player thats being

followed, as in AQ
This commit is contained in:
Richard Allen 2002-03-02 14:54:24 +00:00
parent 3f04c6bf64
commit 4e57c73605
3 changed files with 37 additions and 8 deletions

View File

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.23 2002/03/02 14:54:24 jbravo
// Added the skin and model names to the name of the player thats being
// followed, as in AQ
//
// Revision 1.22 2002/02/28 05:41:54 blaze
// weapons stats on client side
//
@ -2474,6 +2478,8 @@ static qboolean CG_DrawFollow( void ) {
float x;
vec4_t color;
const char *name;
int team;
char combinedName[512];
if ( !(cg.snap->ps.pm_flags & PMF_FOLLOW) ) {
return qfalse;
@ -2483,20 +2489,24 @@ static qboolean CG_DrawFollow( void ) {
color[2] = 1;
color[3] = 1;
team = cgs.clientinfo[ cg.snap->ps.clientNum ].team;
Com_sprintf (combinedName, sizeof(combinedName), "%s\\%s/%s",
cgs.clientinfo[ cg.snap->ps.clientNum ].name,
cgs.clientinfo[ cg.snap->ps.clientNum ].modelName,
cgs.clientinfo[ cg.snap->ps.clientNum ].skinName);
CG_DrawBigString( 320 - 9 * 8, 24, "following", 1.0F );
name = cgs.clientinfo[ cg.snap->ps.clientNum ].name;
x = 0.5 * ( 640 - GIANT_WIDTH -16 * CG_DrawStrlen( combinedName ) );
x = 0.5 * ( 640 - GIANT_WIDTH * CG_DrawStrlen( name ) );
CG_DrawStringExt( x, 40, name, color, qtrue, qtrue, GIANT_WIDTH, GIANT_HEIGHT, 0 );
CG_DrawStringExt( x, 40, combinedName, color, qtrue, qtrue, GIANT_WIDTH - 16, GIANT_HEIGHT - 16, 0 );
return qtrue;
}
/*
=================
CG_DrawAmmoWarning

View File

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.42 2002/03/02 14:54:24 jbravo
// Added the skin and model names to the name of the player thats being
// followed, as in AQ
//
// Revision 1.41 2002/03/01 18:21:26 jbravo
// Cleanups and removal of g_RQ3_sniperup
//
@ -1156,7 +1160,7 @@ void ClientBegin( int clientNum ) {
gentity_t *ent;
gclient_t *client;
int flags;
int savedPing,i;
int savedPing, i;
int savedPers[MAX_PERSISTANT];
ent = g_entities + clientNum;
@ -1237,6 +1241,7 @@ void ClientBegin( int clientNum ) {
// NiceAss: Only set it if there is no value. Fix for going into spectator resetting values.
if (!client->teamplayWeapon) client->teamplayWeapon = WP_MP5;
if (!client->teamplayItem) client->teamplayItem = HI_KEVLAR;
i = RQ3TeamCount( -1, client->sess.sessionTeam);
}
}
@ -1571,7 +1576,7 @@ server system housekeeping.
void ClientDisconnect( int clientNum ) {
gentity_t *ent;
gentity_t *tent;
int i;
int oldTeam, i;
// cleanup if we are kicking a bot that
// hasn't spawned yet
@ -1582,6 +1587,11 @@ void ClientDisconnect( int clientNum ) {
return;
}
// JBravo: to keep the ui teamcount cvars right.
if (g_gametype.integer == GT_TEAMPLAY) {
oldTeam = ent->client->sess.sessionTeam;
}
//Slicer: matchmode
if(g_RQ3_matchmode.integer) {
switch(ent->client->pers.captain ) {
@ -1647,6 +1657,11 @@ void ClientDisconnect( int clientNum ) {
CalculateRanks();
// JBravo: to keep the ui teamcount cvars right.
if (g_gametype.integer == GT_TEAMPLAY) {
i = RQ3TeamCount( -1, oldTeam);
}
if ( ent->r.svFlags & SVF_BOT ) {
BotAIShutdownClient( clientNum, qfalse );
}

View File

@ -5,6 +5,10 @@
//-----------------------------------------------------------------------------
//
// $Log$
// Revision 1.64 2002/03/02 14:54:24 jbravo
// Added the skin and model names to the name of the player thats being
// followed, as in AQ
//
// Revision 1.63 2002/03/01 20:22:31 jbravo
// Fixed a small booboo with the teamcounts
//
@ -1087,7 +1091,7 @@ static void G_SayTo(gentity_t *ent, gentity_t *other, int mode, int color, const
if (ent->client->sess.sessionTeam == TEAM_SPECTATOR &&
(other->client->sess.sessionTeam == TEAM_RED ||
other->client->sess.sessionTeam == TEAM_BLUE) &&
g_gametype.integer == GT_TEAMPLAY) {
level.team_round_going && g_gametype.integer == GT_TEAMPLAY) {
return;
}