Removed some gametype specific stuff from cgame

Wasn't used in RPG-X anyway as gametype is always 0 for RPG-X.
This commit is contained in:
Walter Julius Hennecke 2012-11-13 00:47:12 +01:00
parent 24a1b7c062
commit 8275080a34
8 changed files with 92 additions and 1330 deletions

View file

@ -1298,190 +1298,6 @@ static float CG_DrawTimer( float y ) {
}
#define TINYPAD 1.25
/*
=================
CG_DrawTeamOverlay
=================
*/
#define TEAM_OVERLAY_MAXNAME_WIDTH 12
#define TEAM_OVERLAY_MAXLOCATION_WIDTH 16
static float CG_DrawTeamOverlay( float y, qboolean right, qboolean upper ) {
int x, w, h, xx;
int i, j, len;
const char *p;
vec4_t hcolor;
int pwidth, lwidth;
int plyrs;
char st[16];
clientInfo_t *ci;
int ret_y;
if ( !cg_drawTeamOverlay.integer )
{
return y;
}
if ( cg.snap->ps.persistant[PERS_TEAM] != TEAM_RED && cg.snap->ps.persistant[PERS_TEAM] != TEAM_BLUE )
{
return y; // Not on any team
}
if ( cg.snap->ps.pm_type == PM_INTERMISSION )
{
return y;
}
plyrs = 0;
w = 0;
// max player name width
pwidth = 0;
for (i = 0; i < numSortedTeamPlayers; i++) {
ci = cgs.clientinfo + sortedTeamPlayers[i];
if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) {
plyrs++;
len = CG_DrawStrlen(ci->name);
if (len > pwidth)
pwidth = len;
if ( ci->pClass >= 0 /*PC_NOCLASS*/ )//if any one of them has a class, then we alloc space for the icon
w = 1;
}
}
if (!plyrs)
return y;
if (pwidth > TEAM_OVERLAY_MAXNAME_WIDTH)
pwidth = TEAM_OVERLAY_MAXNAME_WIDTH;
// max location name width
lwidth = 0;
for (i = 1; i < MAX_LOCATIONS; i++) {
p = CG_ConfigString(CS_LOCATIONS + i);
if (p && *p) {
len = CG_DrawStrlen(p);
if (len > lwidth)
lwidth = len;
}
}
if (lwidth > TEAM_OVERLAY_MAXLOCATION_WIDTH)
lwidth = TEAM_OVERLAY_MAXLOCATION_WIDTH;
w += (pwidth + lwidth + 4);
w *= (TINYCHAR_WIDTH * TINYPAD);
if ( right )
x = 640 - w;
else
x = 0;
h = plyrs * (TINYCHAR_HEIGHT * TINYPAD);
if ( upper ) {
ret_y = y + h;
} else {
y -= h;
ret_y = y;
}
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
hcolor[0] = 1;
hcolor[1] = 0;
hcolor[2] = 0;
hcolor[3] = 0.33;
} else {
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 1;
hcolor[3] = 0.33;
}
trap_R_SetColor( hcolor );
CG_DrawPic( x, y, w, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
for (i = 0; i < numSortedTeamPlayers; i++) {
ci = cgs.clientinfo + sortedTeamPlayers[i];
if ( ci->infoValid && ci->team == cg.snap->ps.persistant[PERS_TEAM]) {
xx = x + TINYCHAR_WIDTH;
//Draw class icon if appropriate
if ( ci->pClass >= 0 )
{
xx += (TINYCHAR_WIDTH * TINYPAD);
}
//draw name
hcolor[0] = hcolor[1] = hcolor[2] = hcolor[3] = 1.0;
UI_DrawProportionalString( xx, y, ci->name, UI_TINYFONT, hcolor);
if (lwidth) {
p = CG_ConfigString(CS_LOCATIONS + ci->location);
if (!p || !*p)
p = "unknown";
len = CG_DrawStrlen(p);
if (len > lwidth)
len = lwidth;
xx = x + TINYCHAR_WIDTH * 2 + TINYCHAR_WIDTH * pwidth;
UI_DrawProportionalString( xx, y, p, UI_TINYFONT, hcolor);
}
CG_GetColorForHealth( ci->health, ci->armor, hcolor );
Com_sprintf (st, sizeof(st), "%3i %3i", ci->health, ci->armor);
xx = x + TINYCHAR_WIDTH * 3 +
TINYCHAR_WIDTH * pwidth + TINYCHAR_WIDTH * lwidth;
UI_DrawProportionalString( xx, y, st, UI_TINYFONT, hcolor);
// draw weapon icon
xx += (TINYCHAR_WIDTH * TINYPAD) * 3;
if ( cg_weapons[ci->curWeapon].weaponIcon ) {
CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT,
cg_weapons[ci->curWeapon].weaponIcon );
} else {
CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT,
cgs.media.deferShader );
}
// Draw powerup icons
if (right) {
xx = x;
} else {
xx = x + w - TINYCHAR_WIDTH;
}
for (j = 0; j < PW_NUM_POWERUPS; j++) {
if (ci->powerups & (1 << j)) {
gitem_t *item = BG_FindItemForPowerup( j );
if (item)
{
CG_DrawPic( xx, y, TINYCHAR_WIDTH, TINYCHAR_HEIGHT,
trap_R_RegisterShader( item->icon ) );
}
if (right) {
xx -= (TINYCHAR_WIDTH * TINYPAD);
} else {
xx += (TINYCHAR_WIDTH * TINYPAD);
}
}
}
y += (TINYCHAR_HEIGHT * TINYPAD);
}
}
return ret_y;
}
/*
=====================
CG_DrawUpperRight
@ -1505,10 +1321,6 @@ static void CG_DrawUpperRight( void ) {
y = CG_DrawSnapshot( y );
}
if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 1 ) {
y = CG_DrawTeamOverlay( y, qtrue, qtrue );
}
cgs.widescreen.state = WIDESCREEN_NONE;
}
@ -1661,10 +1473,6 @@ static void CG_DrawLowerRight( void ) {
cgs.widescreen.state = WIDESCREEN_RIGHT;
if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 2 ) {
y = CG_DrawTeamOverlay( y, qtrue, qfalse );
}
y = CG_DrawScores( y );
y = CG_DrawPowerups( y );
@ -1715,11 +1523,6 @@ static void CG_DrawLowerLeft( void ) {
cgs.widescreen.state = WIDESCREEN_LEFT;
if ( cgs.gametype >= GT_TEAM && cg_drawTeamOverlay.integer == 3 ) {
y = CG_DrawTeamOverlay( y, qfalse, qfalse );
}
y = CG_DrawPickupItem( y );
cgs.widescreen.state = WIDESCREEN_NONE;
@ -1729,77 +1532,6 @@ static void CG_DrawLowerLeft( void ) {
//===========================================================================================
/*
=================
CG_DrawTeamInfo
=================
*/
static void CG_DrawTeamInfo( void ) {
int w, h;
int i, len;
vec4_t hcolor;
int chatHeight;
#define CHATLOC_Y 420 // bottom end
#define CHATLOC_X 0
if (cg_teamChatHeight.integer < TEAMCHAT_HEIGHT)
chatHeight = cg_teamChatHeight.integer;
else
chatHeight = TEAMCHAT_HEIGHT;
if (chatHeight <= 0)
return; // disabled
if (cgs.teamLastChatPos != cgs.teamChatPos) {
if (cg.time - cgs.teamChatMsgTimes[cgs.teamLastChatPos % chatHeight] > cg_teamChatTime.integer) {
cgs.teamLastChatPos++;
}
h = (cgs.teamChatPos - cgs.teamLastChatPos) * TINYCHAR_HEIGHT;
w = 0;
for (i = cgs.teamLastChatPos; i < cgs.teamChatPos; i++) {
len = CG_DrawStrlen(cgs.teamChatMsgs[i % chatHeight]);
if (len > w)
w = len;
}
w *= TINYCHAR_WIDTH;
w += TINYCHAR_WIDTH * 2;
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED ) {
hcolor[0] = 1;
hcolor[1] = 0;
hcolor[2] = 0;
hcolor[3] = 0.33;
} else if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE ) {
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 1;
hcolor[3] = 0.33;
} else {
hcolor[0] = 0;
hcolor[1] = 1;
hcolor[2] = 0;
hcolor[3] = 0.33;
}
trap_R_SetColor( hcolor );
CG_DrawPic( CHATLOC_X, CHATLOC_Y - h, 640, h, cgs.media.teamStatusBar );
trap_R_SetColor( NULL );
hcolor[0] = hcolor[1] = hcolor[2] = 1.0;
hcolor[3] = 1.0;
for (i = cgs.teamChatPos - 1; i >= cgs.teamLastChatPos; i--) {
UI_DrawProportionalString( CHATLOC_X + TINYCHAR_WIDTH,
CHATLOC_Y - (cgs.teamChatPos - i)*TINYCHAR_HEIGHT,
cgs.teamChatMsgs[i % chatHeight], UI_TINYFONT, hcolor);
}
}
}
/*
===================
CG_DrawHoldableItem
@ -2851,7 +2583,6 @@ static vec3_t playerMaxs = {12, 12, 32}; // {15, 15, 32}
static void CG_DrawCrosshairNames( void ) {
float *color;
char name[MAX_QPATH];
int team;
centity_t *cent;
int x, y;
qboolean tinyFont;
@ -3046,30 +2777,9 @@ static void CG_DrawCrosshairNames( void ) {
//Now only draw team names + health if specifically wanted
Q_strncpyz (name, cgs.clientinfo[ cg.crosshairClientNum ].name, sizeof (name) );
// Draw in red if red team, blue if blue team
if (cgs.gametype >= GT_TEAM)
{
Q_CleanStr(name);
team = cgs.clientinfo[ cg.crosshairClientNum ].team;
if (team==TEAM_RED)
{
color[0] = colorRed[0];
color[1] = colorRed[1];
color[2] = colorRed[2];
}
else
{
color[0] = colorBlue[0];
color[1] = colorBlue[1];
color[2] = colorBlue[2];
}
}
else
{
color[0] = colorTable[CT_YELLOW][0];
color[1] = colorTable[CT_YELLOW][1];
color[2] = colorTable[CT_YELLOW][2];
}
color[0] = colorTable[CT_YELLOW][0];
color[1] = colorTable[CT_YELLOW][1];
color[2] = colorTable[CT_YELLOW][2];
if ( !cg_dynamicCrosshairNames.integer )
{
@ -3133,12 +2843,6 @@ static void CG_DrawSpectator(void) {
{
UI_DrawProportionalString(SCREEN_WIDTH/2, SCREEN_HEIGHT - ((BIGCHAR_HEIGHT * 1.50) * 2) , ingame_text[IGT_SPECTATOR], UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);
}
if ( cgs.gametype == GT_TOURNAMENT ) {
UI_DrawProportionalString(SCREEN_WIDTH/2, SCREEN_HEIGHT - (BIGCHAR_HEIGHT * 1.5), ingame_text[IGT_WAITINGTOPLAY], UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);
}
if ( cgs.gametype == GT_TEAM || cgs.gametype == GT_CTF ) {
UI_DrawProportionalString(SCREEN_WIDTH/2, SCREEN_HEIGHT - (BIGCHAR_HEIGHT * 1.5), ingame_text[IGT_USEDTEAMMENU], UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);
}
}
/*
@ -3259,8 +2963,6 @@ extern void CG_AddGameModNameToGameName( char *gamename );
static void CG_DrawWarmup( void ) {
int w;
int sec;
int i;
clientInfo_t *ci1, *ci2;
const char *s;
sec = cg.warmup;
@ -3277,46 +2979,17 @@ static void CG_DrawWarmup( void ) {
return;
}
if (cgs.gametype == GT_TOURNAMENT) {
// find the two active players
ci1 = NULL;
ci2 = NULL;
for ( i = 0 ; i < cgs.maxclients ; i++ ) {
if ( cgs.clientinfo[i].infoValid && cgs.clientinfo[i].team == TEAM_FREE ) {
if ( !ci1 ) {
ci1 = &cgs.clientinfo[i];
} else {
ci2 = &cgs.clientinfo[i];
}
}
}
char gamename[1024];
if ( ci1 && ci2 ) {
s = va( "%s vs %s", ci1->name, ci2->name );
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
UI_DrawProportionalString( (SCREEN_WIDTH/2), 20,s, UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);
}
} else {
char gamename[1024];
s = ingame_text[IGT_GAME_FREEFORALL];
if ( cgs.gametype == GT_FFA ) {
s = ingame_text[IGT_GAME_FREEFORALL];
} else if ( cgs.gametype == GT_TEAM ) {
s =ingame_text[IGT_GAME_TEAMHOLOMATCH];
} else if ( cgs.gametype == GT_CTF ) {
s = ingame_text[IGT_GAME_CAPTUREFLAG];
} else {
s = "";
}
Q_strncpyz( gamename, s, sizeof(gamename) );
Q_strncpyz( gamename, s, sizeof(gamename) );
CG_AddGameModNameToGameName( gamename );
CG_AddGameModNameToGameName( gamename );
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
UI_DrawProportionalString((SCREEN_WIDTH/2) , 20,gamename, UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);
}
UI_DrawProportionalString((SCREEN_WIDTH/2) , 20,gamename, UI_BIGFONT|UI_CENTER, colorTable[CT_LTGOLD1]);
sec = ( sec - cg.time ) / 1000;
if ( sec < 0 ) {
@ -3668,9 +3341,6 @@ static void CG_Draw2D( void ) {
cgs.widescreen.state = WIDESCREEN_NONE;
}
if ( cgs.gametype >= GT_TEAM ) {
CG_DrawTeamInfo();
}
cgs.widescreen.state = WIDESCREEN_NONE;
}

View file

@ -250,25 +250,7 @@ static void CG_Obituary( entityState_t *ent ) {
if ( attacker == cg.snap->ps.clientNum ) {
char *s;
if ( cgs.gametype < GT_TEAM )
{
s = va("%s %s", ingame_text[IGT_YOUELIMINATED],targetName);
/*s = va("%s %s\n%s %s %i", ingame_text[IGT_YOUELIMINATED],targetName,
CG_PlaceString( cg.snap->ps.persistant[PERS_RANK] + 1 ),ingame_text[IGT_PLACEWITH],
cg.snap->ps.persistant[PERS_SCORE] );*/
}
else
{
//Assimilated message as well
if ( mod == MOD_ASSIMILATE )
{
s = va("%s %s", ingame_text[IGT_YOUASSIMILATED],targetName );
}
else
{
s = va("%s %s", ingame_text[IGT_YOUELIMINATED],targetName );
}
}
s = va("%s %s", ingame_text[IGT_YOUELIMINATED],targetName);
CG_CenterPrint( s, SCREEN_HEIGHT * 0.25, BIGCHAR_WIDTH );
// print the text message as well
}

View file

@ -103,12 +103,7 @@ void CG_LoadingClient( int clientNum ) {
Q_strncpyz( personality, Info_ValueForKey( info, "n" ), sizeof(personality) );
Q_CleanStr( personality );
if( cgs.gametype == GT_SINGLE_PLAYER ) {
trap_S_RegisterSound( va( "sound/voice/computer/misc/%s.wav", model ) ); //not exactly right since it'll miss subskins, but better than using personality
}//precache sound played in g_bot.c, PlayerIntroSound
CG_LoadingString( personality );
CG_LoadingString( personality );
}
@ -265,65 +260,17 @@ void CG_DrawInformation( void ) {
y += PROP_HEIGHT;
}
// game type
switch ( cgs.gametype )
{
case GT_FFA:
s = ingame_text[IGT_GAME_FREEFORALL];
break;
case GT_SINGLE_PLAYER:
s = ingame_text[IGT_GAME_SINGLEPLAYER];
break;
case GT_TOURNAMENT:
s = ingame_text[IGT_GAME_TOURNAMENT];
break;
case GT_TEAM:
s = ingame_text[IGT_GAME_TEAMHOLOMATCH];
break;
case GT_CTF:
s = ingame_text[IGT_GAME_CAPTUREFLAG];
break;
default:
s = ingame_text[IGT_GAME_UNKNOWN];
break;
}
s = ingame_text[IGT_GAME_FREEFORALL];
{
char gamename[1024];
char gamename[1024];
Q_strncpyz( gamename, s, sizeof(gamename) );
Q_strncpyz( gamename, s, sizeof(gamename) );
CG_AddGameModNameToGameName( gamename );
CG_AddGameModNameToGameName( gamename );
UI_DrawProportionalString( x, y, gamename, UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_VLTGOLD1] );
}
UI_DrawProportionalString( x, y, gamename, UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_VLTGOLD1] );
y += PROP_HEIGHT;
/* value = atoi( Info_ValueForKey( info, "timelimit" ) );
if ( value ) {
UI_DrawProportionalString( x, y, va( "%s %i",ingame_text[IGT_TIME_LIMIT], value ),
UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_VLTGOLD1] );
y += PROP_HEIGHT;
}
if (cgs.gametype != GT_CTF) {
value = atoi( Info_ValueForKey( info, "fraglimit" ) );
if ( value ) {
UI_DrawProportionalString( x, y, va( "%s %i", ingame_text[IGT_POINT_LIMIT],value ),
UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_VLTGOLD1] );
y += PROP_HEIGHT;
}
}
if (cgs.gametype == GT_CTF) {
value = atoi( Info_ValueForKey( info, "capturelimit" ) );
if ( value ) {
UI_DrawProportionalString( x, y, va( "%s %i",ingame_text[IGT_CAPTURE_LIMIT], value ),
UI_SMALLFONT|UI_DROPSHADOW, colorTable[CT_VLTGOLD1] );
y += PROP_HEIGHT;
}
}*/
cgs.widescreen.state = WIDESCREEN_NONE;
}

View file

@ -609,66 +609,19 @@ static void CG_RegisterSounds( void )
cg.loadLCARSStage = 1; // Loading bar stage 1
CG_LoadingString( "sounds" );
//TiM
/*if ( cgs.timelimit || cg_buildScript.integer ) { // should we always load this?
cgs.media.oneMinuteSound = trap_S_RegisterSound( "sound/voice/computer/misc/1_minute.wav" );
cgs.media.fiveMinuteSound = trap_S_RegisterSound( "sound/voice/computer/misc/5_minute.wav" );
cgs.media.suddenDeathSound = trap_S_RegisterSound( "sound/voice/computer/misc/sudden_death.wav" );
}*/
//TiM
/*if ( cgs.fraglimit || cg_buildScript.integer ) {
cgs.media.oneFragSound = trap_S_RegisterSound( "sound/voice/computer/misc/1_frag.wav" );
cgs.media.twoFragSound = trap_S_RegisterSound( "sound/voice/computer/misc/2_frags.wav" );
cgs.media.threeFragSound = trap_S_RegisterSound( "sound/voice/computer/misc/3_frags.wav" );
}*/
// if ( cgs.gametype == GT_TOURNAMENT || cg_buildScript.integer ) {
// We always need this since a warmup can be enabled in any game mode
//TiM /*cgs.media.count3Sound = trap_S_RegisterSound( "sound/voice/computer/misc/three.wav" );
cgs.media.count2Sound = trap_S_RegisterSound( "sound/voice/computer/misc/two.wav" );
cgs.media.count1Sound = trap_S_RegisterSound( "sound/voice/computer/misc/one.wav" );
cgs.media.countFightSound = trap_S_RegisterSound( "sound/voice/computer/misc/fight.wav" );
cgs.media.countPrepareSound = trap_S_RegisterSound( "sound/voice/computer/misc/prepare.wav" );
// }
//TiM
/* if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) {
cgs.media.redLeadsSound = trap_S_RegisterSound( "sound/voice/computer/misc/redleads.wav" );
cgs.media.blueLeadsSound = trap_S_RegisterSound( "sound/voice/computer/misc/blueleads.wav" );
cgs.media.teamsTiedSound = trap_S_RegisterSound( "sound/voice/computer/misc/teamstied.wav" );
cgs.media.hitTeamSound = trap_S_RegisterSound( "sound/feedback/hit_teammate.wav" );
}*/
//TiM
/*if (cgs.gametype == GT_CTF || cg_buildScript.integer)
{
cgs.media.ctfStealSound = trap_S_RegisterSound("sound/voice/computer/misc/flagtk_blu.wav");
cgs.media.ctfReturnSound = trap_S_RegisterSound("sound/voice/computer/misc/flagret_blu.wav");
cgs.media.ctfScoreSound = trap_S_RegisterSound("sound/voice/computer/misc/flagcap_blu.wav");
cgs.media.ctfYouStealVoiceSound = trap_S_RegisterSound("sound/voice/computer/misc/stolen.wav");
cgs.media.ctfYouDroppedVoiceSound = trap_S_RegisterSound("sound/voice/computer/misc/dropped_e.wav");
cgs.media.ctfYouReturnVoiceSound = trap_S_RegisterSound("sound/voice/computer/misc/returned.wav");
cgs.media.ctfYouScoreVoiceSound = trap_S_RegisterSound("sound/voice/computer/misc/scored.wav");
cgs.media.ctfTheyStealVoiceSound = trap_S_RegisterSound("sound/voice/computer/misc/stolen_e.wav");
cgs.media.ctfTheyDroppedVoiceSound = trap_S_RegisterSound("sound/voice/computer/misc/dropped.wav"); // Note the flip, because YOU dropped THEIR flag
cgs.media.ctfTheyReturnVoiceSound = trap_S_RegisterSound("sound/voice/computer/misc/returned_e.wav");
cgs.media.ctfTheyScoreVoiceSound = trap_S_RegisterSound("sound/voice/computer/misc/scored_e.wav");
}*/
cgs.media.count2Sound = trap_S_RegisterSound( "sound/voice/computer/misc/two.wav" );
cgs.media.count1Sound = trap_S_RegisterSound( "sound/voice/computer/misc/one.wav" );
cgs.media.countFightSound = trap_S_RegisterSound( "sound/voice/computer/misc/fight.wav" );
cgs.media.countPrepareSound = trap_S_RegisterSound( "sound/voice/computer/misc/prepare.wav" );
cgs.media.interfaceSnd1 = trap_S_RegisterSound( "sound/interface/button4.wav" );
//cgs.media.selectSound = trap_S_RegisterSound( "sound/silence.wav" );//trap_S_RegisterSound( "sound/weapons/change.wav" );
//cgs.media.wearOffSound = trap_S_RegisterSound( "sound/items/wearoff.wav" );
cgs.media.useNothingSound = trap_S_RegisterSound( "sound/items/use_nothing.wav" );
//TiM//cgs.media.holoOpenSound = trap_S_RegisterSound( "sound/movers/doors/holoopen.wav" );
cgs.media.teleInSound = trap_S_RegisterSound( "sound/world/transin.wav" );
//cgs.media.teleOutSound = trap_S_RegisterSound( "sound/world/transout.wav" );
cgs.media.transportSound = trap_S_RegisterSound( "sound/world/transporter.wav" );
cgs.media.respawnSound = trap_S_RegisterSound( "sound/items/respawn1.wav" );
//cgs.media.noAmmoSound = trap_S_RegisterSound( "sound/weapons/noammo.wav" );
cgs.media.talkSound = trap_S_RegisterSound( "sound/interface/communicator.wav" );
//cgs.media.landSound = trap_S_RegisterSound( "sound/player/land1.wav");
@ -681,41 +634,16 @@ static void CG_RegisterSounds( void )
cgs.media.splatSound = trap_S_RegisterSound( "sound/weapons/bodyfall.wav");
//cgs.media.hitSound = trap_S_RegisterSound( "sound/feedback/hit.wav" );
//cgs.media.shieldHitSound = trap_S_RegisterSound( "sound/feedback/shieldHit.wav" );
//cgs.media.shieldPierceSound = trap_S_RegisterSound( "sound/feedback/shieldPierce.wav" );
//TiM
/*cgs.media.rewardImpressiveSound = trap_S_RegisterSound( "sound/voice/computer/misc/impressive.wav" );
cgs.media.rewardExcellentSound = trap_S_RegisterSound( "sound/voice/computer/misc/excellent.wav" );
cgs.media.rewardDeniedSound = trap_S_RegisterSound( "sound/voice/computer/misc/denied.wav" );
cgs.media.rewardFirstStrikeSound = trap_S_RegisterSound( "sound/voice/computer/misc/1ststrike.wav");
cgs.media.rewardAceSound = trap_S_RegisterSound( "sound/voice/computer/misc/ace.wav");
cgs.media.rewardExpertSound = trap_S_RegisterSound( "sound/voice/computer/misc/expert.wav");
cgs.media.rewardMasterSound = trap_S_RegisterSound( "sound/voice/computer/misc/master.wav");
cgs.media.rewardChampionSound = trap_S_RegisterSound( "sound/voice/computer/misc/champion.wav");*/
//TiM
/*cgs.media.takenLeadSound = trap_S_RegisterSound( "sound/voice/computer/misc/takenlead.wav");
cgs.media.tiedLeadSound = trap_S_RegisterSound( "sound/voice/computer/misc/tiedlead.wav");
cgs.media.lostLeadSound = trap_S_RegisterSound( "sound/voice/computer/misc/lostlead.wav");*/
cgs.media.watrInSound = trap_S_RegisterSound( "sound/player/watr_in.wav");
cgs.media.watrOutSound = trap_S_RegisterSound( "sound/player/watr_out.wav");
cgs.media.watrUnSound = trap_S_RegisterSound( "sound/player/watr_un.wav");
cgs.media.jumpPadSound = trap_S_RegisterSound ("sound/items/damage3.wav" );
//cgs.media.poweruprespawnSound = trap_S_RegisterSound ("sound/items/poweruprespawn.wav");
cgs.media.disintegrateSound = trap_S_RegisterSound( "sound/weapons/prifle/disint.wav" );
cgs.media.disintegrate2Sound = trap_S_RegisterSound( "sound/weapons/prifle/disint2.wav" );
cgs.media.playerExplodeSound = trap_S_RegisterSound( "sound/weapons/explosions/fireball.wav" );
//TiM
/*cgs.media.holoInitSound = trap_S_RegisterSound("sound/voice/computer/misc/proginit.wav");
cgs.media.holoDoorSound = trap_S_RegisterSound("sound/movers/doors/holoopen.wav");
cgs.media.holoFadeSound = trap_S_RegisterSound("sound/movers/holodeckdecloak.wav");*/
cgs.media.phaserEmptySound = trap_S_RegisterSound("sound/weapons/phaser/phaserempty.wav");
//RPG-X: RedTechie - Load sound for shake cmd
@ -1068,67 +996,6 @@ static void CG_RegisterGraphics( void ) {
cgs.media.chunkModels[MT_STONE][i] = trap_R_RegisterModel( va( "models/chunks/generic/chunks_%i.md3", i+1 ) );
}
//TiM
/*if ( cgs.gametype == GT_CTF || cg_buildScript.integer ) {
cgs.media.redFlagModel = trap_R_RegisterModel( "models/flags/flag_red.md3" );//must match bg_misc item and botfiles/items.c
cgs.media.blueFlagModel = trap_R_RegisterModel( "models/flags/flag_blue.md3" );//must match bg_misc item and botfiles/items.c
cgs.media.redFlagShader[0] = trap_R_RegisterShaderNoMip( "icons/iconf_red1" );
cgs.media.redFlagShader[1] = trap_R_RegisterShaderNoMip( "icons/iconf_red2" );
cgs.media.redFlagShader[2] = trap_R_RegisterShaderNoMip( "icons/iconf_red3" );
cgs.media.blueFlagShader[0] = trap_R_RegisterShaderNoMip( "icons/iconf_blu1" );
cgs.media.blueFlagShader[1] = trap_R_RegisterShaderNoMip( "icons/iconf_blu2" );
cgs.media.blueFlagShader[2] = trap_R_RegisterShaderNoMip( "icons/iconf_blu3" );
// this determines the normal shaders / skins used by the ctf flags
if (Q_stricmp("", CG_ConfigString( CS_RED_GROUP)))
{
// try loading the group based flag skin
Com_sprintf(temp_skin, sizeof(temp_skin),"models/flags/%s_red", CG_ConfigString( CS_RED_GROUP));
cgs.media.redFlagShader[3] = trap_R_RegisterShader3D( temp_skin );
// did it load?
if (!cgs.media.redFlagShader[3])
{
//no, go with default skin
cgs.media.redFlagShader[3] = trap_R_RegisterShader3D( "models/flags/default_red" );
}
}
else
{
cgs.media.redFlagShader[3] = trap_R_RegisterShader3D( "models/flags/default_red" );
}
if (Q_stricmp("", CG_ConfigString( CS_BLUE_GROUP)))
{
// try loading the group based flag skin
Com_sprintf(temp_skin, sizeof(temp_skin),"models/flags/%s_blue", CG_ConfigString( CS_BLUE_GROUP));
cgs.media.blueFlagShader[3] = trap_R_RegisterShader3D( temp_skin );
// did it load?
if (!cgs.media.blueFlagShader[3])
{
//no, go with default skin
cgs.media.blueFlagShader[3] = trap_R_RegisterShader3D( "models/flags/default_blue" );
}
}
else
{
cgs.media.blueFlagShader[3] = trap_R_RegisterShader3D( "models/flags/default_blue" );
}
}*/
//TiM
/*if ( cgs.gametype >= GT_TEAM || cg_buildScript.integer ) {
cgs.media.teamRedShader = trap_R_RegisterShader( "sprites/team_red" );
cgs.media.teamBlueShader = trap_R_RegisterShader( "sprites/team_blue" );
cgs.media.redQuadShader = trap_R_RegisterShader("powerups/blueflag" );
cgs.media.teamStatusBar = trap_R_RegisterShader( "gfx/2d/colorbar.tga" );
}*/
//cgs.media.chatShader = trap_R_RegisterShader( "sprites/chat" );
//cgs.media.bloodExplosionShader = trap_R_RegisterShader( "bloodExplosion" );
//cgs.media.ringFlashModel = trap_R_RegisterModel("models/weaphits/ring02.md3");
cgs.media.teleportEffectModel = trap_R_RegisterModel( "models/misc/telep.md3" );
cgs.media.teleportEffectShader = trap_R_RegisterShader( "playerTeleport" );

View file

@ -1624,23 +1624,11 @@ static void CG_LoadClientInfo( clientInfo_t *ci , int clientNum) {
{
if ( !CG_RegisterClientModelname( ci, cg_defaultChar.string, DEFAULT_MODEL, ci->skinName ) )
{
// fall back
if ( cgs.gametype >= GT_TEAM )
if ( !CG_RegisterClientModelname( ci, cg_defaultChar.string, DEFAULT_MODEL, DEFAULT_SKIN ) )
{
// keep skin name
if ( !CG_RegisterClientModelname( ci, DEFAULT_CHAR, DEFAULT_MODEL, ci->skinName ) ) {
CG_Error( "DEFAULT_CHAR / model /skin ( %s/%s/%s ) failed to register",
DEFAULT_CHAR, DEFAULT_MODEL, ci->skinName );
}
}
else
{
if ( !CG_RegisterClientModelname( ci, cg_defaultChar.string, DEFAULT_MODEL, DEFAULT_SKIN ) )
if ( !CG_RegisterClientModelname( ci, DEFAULT_CHAR, DEFAULT_MODEL, DEFAULT_SKIN ) )
{
if ( !CG_RegisterClientModelname( ci, DEFAULT_CHAR, DEFAULT_MODEL, DEFAULT_SKIN ) )
{
CG_Error( "DEFAULT_CHAR (%s) failed to register", DEFAULT_CHAR );
}
CG_Error( "DEFAULT_CHAR (%s) failed to register", DEFAULT_CHAR );
}
}
}
@ -1819,30 +1807,6 @@ static void CG_SetDeferredClientInfo( clientInfo_t *ci, int clientNum ) {
int i;
clientInfo_t *match;
// if we are in teamplay, only grab a model if the skin is correct
if ( cgs.gametype >= GT_TEAM ) {
// this is ONLY for optimization - it's exactly the same effect as CG_LoadClientInfo
for ( i = 0 ; i < cgs.maxclients ; i++ ) {
match = &cgs.clientinfo[ i ];
if ( !match->infoValid ) {
continue;
}
if ( Q_stricmp( ci->skinName, match->skinName ) ) {
continue;
}
ci->deferred = qtrue;
CG_CopyClientInfoModel( match, ci );
return;
}
// load the full model, because we don't ever want to show
// an improper team skin. This will cause a hitch for the first
// player, when the second enters. Combat shouldn't be going on
// yet, so it shouldn't matter
CG_LoadClientInfo( ci, clientNum );
return;
}
// find the first valid clientinfo and grab its stuff
for ( i = 0 ; i < cgs.maxclients ; i++ ) {
match = &cgs.clientinfo[ i ];
@ -1964,13 +1928,6 @@ void CG_NewClientInfo( int clientNum ) {
// Q_strncpyz( newInfo.modelName, DEFAULT_MODEL, sizeof( newInfo.modelName ) );
// Q_strncpyz( newInfo.skinName, "default", sizeof( newInfo.skinName ) );
if ( cgs.gametype >= GT_TEAM ) {
// keep skin name
skin = strchr( v, '/' );
if ( model ) {
Q_strncpyz( newInfo.skinName, skin + 1, sizeof( newInfo.skinName ) );
}
}
} else {
//Q_strncpyz( newInfo.modelName, v, sizeof( newInfo.modelName ) );
//Okay! Here we go! We gotta take a string like kulhane/admiral/teal
@ -2074,8 +2031,7 @@ void CG_NewClientInfo( int clientNum ) {
( cg_deferPlayers.integer && !cg_buildScript.integer && !cg.loading &&
((clientNum != cg.predictedPlayerState.clientNum) && cg.validPPS) ) ) {
// keep whatever they had if it won't violate team skins
if ( ci->infoValid &&
( cgs.gametype < GT_TEAM || !Q_stricmp( newInfo.skinName, ci->skinName ) ) ) {
if ( ci->infoValid || !Q_stricmp( newInfo.skinName, ci->skinName ) ) {
CG_CopyClientInfoModel( ci, &newInfo );
newInfo.deferred = qtrue;
} else {
@ -3294,114 +3250,6 @@ static void CG_PlayerSprites( centity_t *cent ) {
CG_PlayerFloatSprite( cent, cgs.media.connectionShader );
return;
}
/*
if ( cent->currentState.eFlags & EF_TALK )
{
if ( cgs.clientinfo[cent->currentState.number].pClass == PC_ACTIONHERO )
{
CG_PlayerFloatSprite( cent, cgs.media.heroSpriteShader );
}
if ( cgs.clientinfo[cent->currentState.number].pClass == PC_BORG )
{
if ( (cg_entities[cent->currentState.number].currentState.powerups&(1<<PW_LASER)) )
{
CG_PlayerFloatSprite( cent, cgs.media.borgQueenIconShader );
}
else
{
CG_PlayerFloatSprite( cent, cgs.media.borgIconShader );
}
}
CG_PlayerFloatSprite( cent, cgs.media.chatShader );
return;
}
//label the action hero
if ( cgs.clientinfo[cent->currentState.number].pClass == PC_ACTIONHERO )
{
CG_PlayerFloatSprite( cent, cgs.media.heroSpriteShader );
return;
}
//Special hack: if it's Borg who has regen going, must be Borg queen
if ( cgs.clientinfo[cent->currentState.number].pClass == PC_BORG )
{
if ( (cg_entities[cent->currentState.number].currentState.powerups&(1<<PW_LASER)) )
{
CG_PlayerFloatSprite( cent, cgs.media.borgQueenIconShader );
return;
}
}
//NOTE: Borg *Queen* should have been caught above
if ( cgs.clientinfo[cent->currentState.number].pClass == PC_BORG )
{
CG_PlayerFloatSprite( cent, cgs.media.borgIconShader );
return;
}
if ( cent->currentState.eFlags & EF_AWARD_FIRSTSTRIKE ) {
CG_PlayerFloatSprite( cent, cgs.media.medalFirstStrike );
return;
}
if ( cent->currentState.eFlags & EF_AWARD_IMPRESSIVE ) {
CG_PlayerFloatSprite( cent, cgs.media.medalImpressive );
return;
}
if ( cent->currentState.eFlags & EF_AWARD_EXCELLENT ) {
CG_PlayerFloatSprite( cent, cgs.media.medalExcellent );
return;
}
if ( cent->currentState.eFlags & EF_AWARD_ACE ) {
CG_PlayerFloatSprite( cent, cgs.media.medalAce );
return;
}
if ( cent->currentState.eFlags & EF_AWARD_EXPERT ) {
CG_PlayerFloatSprite( cent, cgs.media.medalExpert );
return;
}
if ( cent->currentState.eFlags & EF_AWARD_MASTER ) {
CG_PlayerFloatSprite( cent, cgs.media.medalMaster );
return;
}
if ( cent->currentState.eFlags & EF_AWARD_CHAMPION ) {
CG_PlayerFloatSprite( cent, cgs.media.medalChampion );
return;
}
team = cgs.clientinfo[ cent->currentState.clientNum ].team;
if ( !(cent->currentState.eFlags & EF_DEAD) &&
cg.snap->ps.persistant[PERS_TEAM] == team &&
cgs.gametype >= GT_TEAM &&
cent->currentState.number != cg.snap->ps.clientNum ) // Don't show a sprite above a player's own head in 3rd person.
{
if (team==TEAM_RED)
{
CG_PlayerFloatSprite( cent, cgs.media.teamRedShader );
}
else if (team==TEAM_BLUE)
{
CG_PlayerFloatSprite( cent, cgs.media.teamBlueShader );
}
// else don't show an icon. There currently are no other team types.
return;
}*/
//RPG-X: RedTechie - Cloak sprite basiclly other admins will see this only to tell if that player is cloaked and a admin
//if( cent->currentState.powerups & ( 1 << PW_INVIS ) ){
// CG_PlayerFloatSprite( cent, cgs.media.cloakspriteShader );
// return;
//}
return;
}
/*

View file

@ -293,123 +293,6 @@ void CG_CheckLocalSounds( playerState_t *ps, playerState_t *ops )
if ( cg.intermissionStarted ) {
return;
}
// reward sounds
//RPG-X: RedTechie - No reward or frag limit sounds
/*if ( ps->persistant[PERS_REWARD_COUNT] > ops->persistant[PERS_REWARD_COUNT] ) {
switch ( ps->persistant[PERS_REWARD] ) {
case REWARD_IMPRESSIVE:
trap_S_StartLocalSound( cgs.media.rewardImpressiveSound, CHAN_ANNOUNCER );
cg.rewardTime = cg.time;
cg.rewardShader = cgs.media.medalImpressive;
cg.rewardCount = ps->persistant[PERS_IMPRESSIVE_COUNT];
break;
case REWARD_EXCELLENT:
trap_S_StartLocalSound( cgs.media.rewardExcellentSound, CHAN_ANNOUNCER );
cg.rewardTime = cg.time;
cg.rewardShader = cgs.media.medalExcellent;
cg.rewardCount = ps->persistant[PERS_EXCELLENT_COUNT];
break;
case REWARD_DENIED:
trap_S_StartLocalSound( cgs.media.rewardDeniedSound, CHAN_ANNOUNCER );
break;
case REWARD_FIRST_STRIKE:
trap_S_StartLocalSound( cgs.media.rewardFirstStrikeSound, CHAN_ANNOUNCER);
cg.rewardTime = cg.time;
cg.rewardShader = cgs.media.medalFirstStrike;
cg.rewardCount = 1;
break;
case REWARD_STREAK:
// Play a different sound depending on how long the streak is.
cg.rewardTime = cg.time;
cg.rewardCount = 1;
if (ps->persistant[PERS_STREAK_COUNT] >= STREAK_CHAMPION)
{
trap_S_StartLocalSound( cgs.media.rewardChampionSound, CHAN_ANNOUNCER);
cg.rewardShader = cgs.media.medalChampion;
}
else if (ps->persistant[PERS_STREAK_COUNT] >= STREAK_MASTER)
{
trap_S_StartLocalSound( cgs.media.rewardMasterSound, CHAN_ANNOUNCER);
cg.rewardShader = cgs.media.medalMaster;
}
else if (ps->persistant[PERS_STREAK_COUNT] >= STREAK_EXPERT)
{
trap_S_StartLocalSound( cgs.media.rewardExpertSound, CHAN_ANNOUNCER);
cg.rewardShader = cgs.media.medalExpert;
}
else if (ps->persistant[PERS_STREAK_COUNT] >= STREAK_ACE)
{
trap_S_StartLocalSound( cgs.media.rewardAceSound, CHAN_ANNOUNCER);
cg.rewardShader = cgs.media.medalAce;
}
break;
default:
CG_Error( "Bad reward_t" );
}
} else {
// lead changes (only if no reward)
if ( !cg.warmup && !(cg.predictedPlayerState.introTime > cg.time) )
{
// never play lead changes during warmup or holo doors
if ( ps->persistant[PERS_RANK] != ops->persistant[PERS_RANK] ) {
if ( cgs.gametype >= GT_TEAM ) {
if ( ps->persistant[PERS_RANK] == 2 ) {
trap_S_StartLocalSound( cgs.media.teamsTiedSound, CHAN_ANNOUNCER );
} else if ( ps->persistant[PERS_RANK] == 0 ) {
trap_S_StartLocalSound( cgs.media.redLeadsSound, CHAN_ANNOUNCER );
} else if ( ps->persistant[PERS_RANK] == 1 ) {
trap_S_StartLocalSound( cgs.media.blueLeadsSound, CHAN_ANNOUNCER );
}
} else {
if ( ps->persistant[PERS_RANK] == 0 ) {
trap_S_StartLocalSound( cgs.media.takenLeadSound, CHAN_ANNOUNCER );
} else if ( ps->persistant[PERS_RANK] == RANK_TIED_FLAG ) {
trap_S_StartLocalSound( cgs.media.tiedLeadSound, CHAN_ANNOUNCER );
} else if ( ( ops->persistant[PERS_RANK] & ~RANK_TIED_FLAG ) == 0 ) {
trap_S_StartLocalSound( cgs.media.lostLeadSound, CHAN_ANNOUNCER );
}
}
}
}
}
// timelimit warnings
if ( cgs.timelimit > 0 ) {
int msec;
msec = cg.time - cgs.levelStartTime;
if ( cgs.timelimit > 5 && !( cg.timelimitWarnings & 1 ) && msec > (cgs.timelimit - 5) * 60 * 1000 ) {
cg.timelimitWarnings |= 1;
trap_S_StartLocalSound( cgs.media.fiveMinuteSound, CHAN_ANNOUNCER );
}
if ( !( cg.timelimitWarnings & 2 ) && msec > (cgs.timelimit - 1) * 60 * 1000 ) {
cg.timelimitWarnings |= 2;
trap_S_StartLocalSound( cgs.media.oneMinuteSound, CHAN_ANNOUNCER );
}
if ( !( cg.timelimitWarnings & 4 ) && msec > ( cgs.timelimit * 60 + 2 ) * 1000 ) {
cg.timelimitWarnings |= 4;
trap_S_StartLocalSound( cgs.media.suddenDeathSound, CHAN_ANNOUNCER );
}
}
// fraglimit warnings
if ( cgs.fraglimit > 0 && cgs.gametype != GT_CTF ) {
highScore = cgs.scores1;
if ( cgs.fraglimit > 3 && !( cg.fraglimitWarnings & 1 ) && highScore == (cgs.fraglimit - 3) ) {
cg.fraglimitWarnings |= 1;
trap_S_StartLocalSound( cgs.media.threeFragSound, CHAN_ANNOUNCER );
}
if ( cgs.fraglimit > 2 && !( cg.fraglimitWarnings & 2 ) && highScore == (cgs.fraglimit - 2) ) {
cg.fraglimitWarnings |= 2;
trap_S_StartLocalSound( cgs.media.twoFragSound, CHAN_ANNOUNCER );
}
if ( !( cg.fraglimitWarnings & 4 ) && highScore == (cgs.fraglimit - 1) ) {
cg.fraglimitWarnings |= 4;
trap_S_StartLocalSound( cgs.media.oneFragSound, CHAN_ANNOUNCER );
}
}*/
}

View file

@ -412,281 +412,8 @@ static void CG_DrawClientScore( int y, score_t *score, float *color, float fade,
CG_DrawClientScore_Big(y, score, color, fade, largeFormat );
return;
}
//TiM : From the looks of this, nothing after this is acctually called O_o
//Save graphics then
// Black background
/*if (cgs.gametype < GT_TEAM)
{
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 0;
hcolor[3] = fade * 0.7;
CG_FillRect( SCOREBOARD_X, y,SB_TOPLINE_LENGTH , SB_NORMAL_HEIGHT, hcolor );
}*/
// Left Side of scoreboard
//CG_FillRect( SCOREBOARD_X, y - 16 , 12, 48, colorTable[CT_DKORANGE]);
/*
picSize = 20;
// draw the handicap or bot skill marker (unless player has flag)
if ( ci->powerups & ( 1 << PW_REDFLAG ) )
{
CG_DrawFlagModel( SB_BOTICON_X, y, picSize, picSize, TEAM_RED );
}
else if ( ci->powerups & ( 1 << PW_BORG_ADAPT ) )
{
CG_DrawFlagModel( SB_BOTICON_X, y, picSize, picSize, TEAM_BLUE );
}
else
{
if ( ci->botSkill > 0 && ci->botSkill <= 5 )
{
if ( cg_drawIcons.integer )
{
CG_DrawPic( SB_BOTICON_X, y+2, picSize, picSize, cgs.media.botSkillShaders[ ci->botSkill - 1 ] );
}
}
else if ( ci->handicap < 100 )
{
Com_sprintf( string, sizeof( string ), "%i", ci->handicap );
if ( cgs.gametype == GT_TOURNAMENT )
{
// CG_DrawSmallStringColor( iconx, y - SMALLCHAR_HEIGHT/2, string, color );
UI_DrawProportionalString( SB_BOTICON_X+2, y - SMALLCHAR_HEIGHT/2, string, UI_SMALLFONT, color);
}
else
{
// CG_DrawSmallStringColor( iconx, y, string, color );
UI_DrawProportionalString( SB_BOTICON_X+2, y , string, UI_SMALLFONT, color);
}
}
// draw the wins / losses
if ( cgs.gametype == GT_TOURNAMENT ) {
Com_sprintf( string, sizeof( string ), "%i/%i", ci->wins, ci->losses );
if( ci->handicap < 100 && !ci->botSkill )
{
// CG_DrawSmallStringColor( iconx, y + SMALLCHAR_HEIGHT/2, string, color );
UI_DrawProportionalString( SB_BOTICON_X, y + SMALLCHAR_HEIGHT/2 , string, UI_SMALLFONT, color);
}
else
{
// CG_DrawSmallStringColor( iconx, y, string, color );
UI_DrawProportionalString( SB_BOTICON_X, y , string, UI_SMALLFONT, color);
}
}
}*/
// draw the face
/*VectorClear( headAngles );
headAngles[YAW] = 180;
CG_DrawHead( SB_HEAD_X+14, y, picSize, picSize, score->client, headAngles );//Before RPG-X: CG_DrawHead( SB_HEAD_X+14, y, picSize, picSize, score->client, headAngles );
// highlight your position
if ( score->client == cg.snap->ps.clientNum )
{
int rank;
localClient = qtrue;
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR
|| cgs.gametype >= GT_TEAM )
{
rank = -1;
}
else
{
rank = cg.snap->ps.persistant[PERS_RANK] & ~RANK_TIED_FLAG;
}
if ( rank == 0 )
{
hcolor[0] = 0;
hcolor[1] = 0;
hcolor[2] = 0.7;
}
else if ( rank == 1 )
{
hcolor[0] = 0.7;
hcolor[1] = 0;
hcolor[2] = 0;
}
else if ( rank == 2 )
{
hcolor[0] = 0.7;
hcolor[1] = 0.7;
hcolor[2] = 0;
}
else
{
hcolor[0] = 0.7;
hcolor[1] = 0.7;
hcolor[2] = 0.7;
}
hcolor[3] = fade * 0.7;
CG_FillRect( SB_SCORELINE_X - TINYCHAR_WIDTH, y,
SB_TOPLINE_LENGTH - ((SB_SCORELINE_X - TINYCHAR_WIDTH) - SCOREBOARD_X), BIGCHAR_HEIGHT+1, hcolor );
}
// draw the score line
if ( score->ping == -1 ) {
Com_sprintf(string, sizeof(string),
" connecting %s", ci->name);
UI_DrawProportionalString( SB_SCORELINE_X, y, string, UI_TINYFONT, colorTable[CT_LTGOLD1]);
}
else if ( ci->team == TEAM_SPECTATOR )
{
CG_NamePrep(string,ci->name,100,UI_TINYFONT); //100 pixels in the name column
Com_sprintf(string,sizeof(string),"%s (%s)", string, ingame_text[IGT_SPECTATOR]);
UI_DrawProportionalString( SB_NAME_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_LTGOLD1]);
// Don't show other stats for Spectators
// Com_sprintf(string,sizeof(string),"%5i",score->score);
// UI_DrawProportionalString( SB_SCORE_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_YELLOW]);
// Com_sprintf(string,sizeof(string),"%5i",score->time);
// UI_DrawProportionalString( SB_TIME_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_LTGOLD1]);
// Com_sprintf(string,sizeof(string),"%5i",score->ping);
// UI_DrawProportionalString( SB_PING_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_LTGOLD1]);
// Com_sprintf(string,sizeof(string),"%5i",score->killedCnt);
// UI_DrawProportionalString( SB_KILLEDCNT_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_RED]);
}
else
{*/
/*
if (score->faveTarget >= 0)
{
faveTarget = cgs.clientinfo[score->faveTarget].name;
}
else
{
faveTarget = ingame_text[IGT_NONE];
}
*/
/*if (score->worstEnemy >= 0)
{
worstEnemy = cgs.clientinfo[score->worstEnemy].name;
}
else
{
worstEnemy = ingame_text[IGT_NONE];
}
if (score->faveWeapon > 0)
{
faveWeapon = ingame_text[IGT_NONE];
// Find weapon
for ( item = bg_itemlist + 1 ; item->classname ; item++ )
{
if ( item->giType != IT_WEAPON ) {
continue;
}
if (item->giTag == score->faveWeapon)
{
faveWeapon = item->pickup_name;
break;
}
}
}
// Com_sprintf(string, sizeof(string),
// "%-20s %5i %5i %-20s (%5i) %-20s (%5i)",ci->name, score->score, score->time,
// faveTarget, score->faveTargetKills,
// worstEnemy, score->worstEnemyKills);
CG_NamePrep(string,ci->name,100,UI_TINYFONT); //100 pixels in the name column
//RPG-X: J2J (NOTE TO CODERS)- Heading for score board -DO NOT EDIT- Text for these are in mp_ingametext.dat
Com_sprintf(string,sizeof(string),"%5i", score->client);
UI_DrawProportionalString( SB_NAME_X-20, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_WHITE]);
UI_DrawProportionalString( SB_NAME_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_WHITE]);
Com_sprintf(string,sizeof(string),"%5i",score->score);
UI_DrawProportionalString( SB_SCORE_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_YELLOW]);
Com_sprintf(string,sizeof(string),"%5i",score->time);
UI_DrawProportionalString( SB_TIME_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_LTGOLD1]);
Com_sprintf(string,sizeof(string),"%5i",score->ping);
UI_DrawProportionalString( SB_PING_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_LTGOLD1]);
Com_sprintf(string,sizeof(string),"%5i",score->killedCnt);
UI_DrawProportionalString( SB_KILLEDCNT_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_RED]);
if (worstEnemy)
{
Com_sprintf(string2,sizeof(string2)," (%i)",score->worstEnemyKills);
length = UI_ProportionalStringWidth(string2,UI_TINYFONT );
CG_NamePrep(string,worstEnemy,(100-length),UI_TINYFONT); //100 pixels in the worst enemy column
Com_sprintf(string,sizeof(string),"%s%s",string, string2);
UI_DrawProportionalString( SB_WORSTENEMY_X, y + (TINYCHAR_HEIGHT/2), string, UI_TINYFONT, colorTable[CT_RED]);
}
if (faveWeapon)
{
UI_DrawProportionalString( SB_FAVEWEAPON_X, y + (TINYCHAR_HEIGHT/2), faveWeapon, UI_TINYFONT, colorTable[CT_LTGOLD1]);
}
}
//CG_DrawSmallString( SB_SCORELINE_X, y, string, fade );
// add the "ready" marker for intermission exiting, if not a bot, and if a team type game
if ( inIntermission )
{
qhandle_t h = trap_R_RegisterShader("icons/icon_ready_on"),
h2 = trap_R_RegisterShader("icons/icon_ready_off");
if ( ci->botSkill > 0 && ci->botSkill <= 5 )
{
// i'm a bot. i'm always ready.
trap_R_SetColor( colorTable[CT_VLTGOLD1]);
CG_DrawPic( SB_BOTICON_X+26,y+2, 16, 16,h);
}
else
{
if ( cg.snap->ps.stats[ STAT_CLIENTS_READY ] & ( 1 << score->client ) )
{
//trap_R_SetColor( colorTable[CT_VLTGOLD1]);
//CG_DrawPic( SB_BOTICON_X+26,y+2, 16, 16,h);
}
else// if (score->client)
{
//trap_R_SetColor( colorTable[CT_VLTGOLD1]);
//CG_DrawPic( SB_BOTICON_X+26,y+2, 16, 16,h2);
}
}
}*/
}
/*static int CG_GetTeamCount(team_t team, int maxClients)
{
int i = 0;
int count = 0;
score_t *score = NULL;
clientInfo_t *ci = NULL;
for ( i = 0 ; i < cg.numScores && count < maxClients ; i++ )
{
score = &cg.scores[i];
ci = &cgs.clientinfo[ score->client ];
if ( team!=ci->team || !ci->infoValid )
{
continue;
}
count++;
}
return count;
}*/
/*
=================
CG_TeamScoreboard
@ -911,23 +638,14 @@ qboolean CG_DrawScoreboard( void )
y += (n2 * lineHeight);
maxClients -= n2;
//LOCAL CLIENT AT BOTTOM OF SCOREBOARD
//------------------------------------
//
// If we didn't draw the local client in the scoreboard (because ranked lower than maxClients)
// Look for him and display him at the bottom
//
// BUT not for 'GT_SINGLE_PLAYER' (shouldn't happen anyway, right?)
//
if (cgs.gametype==GT_SINGLE_PLAYER)
localClient = qtrue;
localClient = qfalse;
i=0;
while (!localClient && i<cg.numScores)
{
if ( cg.scores[i].client==cg.snap->ps.clientNum ) // it's me!!
{
CG_DrawClientScore( y, &cg.scores[i], colorYellow, 0.0, lineHeight==SB_NORMAL_HEIGHT );
CG_DrawClientScore( y, &cg.scores[i], colorYellow, 0.0, (qboolean)(lineHeight==SB_NORMAL_HEIGHT) );
y += lineHeight;
localClient = qtrue;
}
@ -1033,50 +751,24 @@ void CG_DrawTourneyScoreboard( void ) {
// print the two scores
y = 160;
if ( cgs.gametype >= GT_TEAM ) {
//
// teamplay scoreboard
//
// CG_DrawStringExt( 8, y, ingame_text[IGT_REDTEAM], color, qtrue, qtrue, GIANT_WIDTH, GIANT_HEIGHT, 0 );
UI_DrawProportionalString( 8, y, ingame_text[IGT_REDTEAM], UI_BIGFONT|UI_DROPSHADOW, color);
s = va("%i", cg.teamScores[0] );
// CG_DrawStringExt( 632 - GIANT_WIDTH * strlen(s), y, s, color, qtrue, qtrue, GIANT_WIDTH, GIANT_HEIGHT, 0 );
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
UI_DrawProportionalString(632 - w, y, s, UI_BIGFONT|UI_DROPSHADOW, color);
y += 64;
// CG_DrawStringExt( 8, y, ingame_text[IGT_BLUETEAM], color, qtrue, qtrue, GIANT_WIDTH, GIANT_HEIGHT, 0 );
UI_DrawProportionalString(8, y, ingame_text[IGT_BLUETEAM], UI_BIGFONT|UI_DROPSHADOW, color);
s = va("%i", cg.teamScores[1] );
// CG_DrawStringExt( 632 - GIANT_WIDTH * strlen(s), y, s, color, qtrue, qtrue, GIANT_WIDTH, GIANT_HEIGHT, 0 );
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
UI_DrawProportionalString(632 - w, y, s, UI_BIGFONT|UI_DROPSHADOW, color);
} else {
//
// free for all scoreboard
//
for ( i = 0 ; i < MAX_CLIENTS ; i++ ) {
ci = &cgs.clientinfo[i];
if ( !ci->infoValid ) {
continue;
}
if ( ci->team != TEAM_FREE ) {
continue;
}
for ( i = 0 ; i < MAX_CLIENTS ; i++ ) {
ci = &cgs.clientinfo[i];
if ( !ci->infoValid ) {
continue;
}
if ( ci->team != TEAM_FREE ) {
continue;
}
// CG_DrawStringExt( 8, y, ci->name, color, qtrue, qtrue, GIANT_WIDTH, GIANT_HEIGHT, 0 );
UI_DrawProportionalString( 8, y, ci->name, UI_BIGFONT|UI_DROPSHADOW, color);
s = va("%i", ci->score );
UI_DrawProportionalString( 8, y, ci->name, UI_BIGFONT|UI_DROPSHADOW, color);
s = va("%i", ci->score );
// CG_DrawStringExt( 632 - GIANT_WIDTH * strlen(s), y, s, color, qtrue, qtrue, GIANT_WIDTH, GIANT_HEIGHT, 0 );
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
UI_DrawProportionalString(632 - w, y, s, UI_BIGFONT|UI_DROPSHADOW, color);
w = UI_ProportionalStringWidth(s,UI_BIGFONT);
UI_DrawProportionalString(632 - w, y, s, UI_BIGFONT|UI_DROPSHADOW, color);
y += 64;
}
y += 64;
}
}
@ -1520,10 +1212,7 @@ AW_Draw
*/
static qboolean AW_Draw( void )
{
char buf[64];
int timer;
int y=0, yfrom=0;
int len;
vec4_t white, yellow; // new colors
// RED GREEN BLUE ALPHA
@ -1557,133 +1246,24 @@ static qboolean AW_Draw( void )
//-----------------------------------------------
if (postgameMenuInfo.phase < 4)
{
if (cgs.gametype <= GT_SINGLE_PLAYER )
// NON TEAM GAMES
// We want the top three player's names and their ranks below the podium
if ( postgameMenuInfo.numClients > 2 )
{
// NON TEAM GAMES
// We want the top three player's names and their ranks below the podium
if ( postgameMenuInfo.numClients > 2 )
{
UI_DrawProportionalString( 510, 480 - 64 - PROP_HEIGHT, postgameMenuInfo.placeNames[2], UI_CENTER, white );
if (postgameMenuInfo.secondPlaceTied)
UI_DrawProportionalString( 510, 480 - 38 - PROP_HEIGHT, ingame_text[IGT_2ND], UI_CENTER, yellow );
else
UI_DrawProportionalString( 510, 480 - 38 - PROP_HEIGHT, ingame_text[IGT_3RD], UI_CENTER, yellow );
}
if ( postgameMenuInfo.numClients > 1)
{
UI_DrawProportionalString( 130, 480 - 64 - PROP_HEIGHT, postgameMenuInfo.placeNames[1], UI_CENTER, white );
UI_DrawProportionalString( 130, 480 - 38 - PROP_HEIGHT, ingame_text[IGT_2ND], UI_CENTER, yellow );
}
UI_DrawProportionalString( 320, 480 - 64 - 2 * PROP_HEIGHT, postgameMenuInfo.placeNames[0], UI_CENTER, white );
UI_DrawProportionalString( 320, 480 - 38 - 2 * PROP_HEIGHT, ingame_text[IGT_1ST], UI_CENTER, yellow );
UI_DrawProportionalString( 510, 480 - 64 - PROP_HEIGHT, postgameMenuInfo.placeNames[2], UI_CENTER, white );
if (postgameMenuInfo.secondPlaceTied)
UI_DrawProportionalString( 510, 480 - 38 - PROP_HEIGHT, ingame_text[IGT_2ND], UI_CENTER, yellow );
else
UI_DrawProportionalString( 510, 480 - 38 - PROP_HEIGHT, ingame_text[IGT_3RD], UI_CENTER, yellow );
}
else //if (cg.snap->ps.persistant[PERS_TEAM]!=TEAM_SPECTATOR)
if ( postgameMenuInfo.numClients > 1)
{
// TEAM
// We want the winning team character's name, a line explaining "Klingon MVP"
UI_DrawProportionalString( 320, 480 - 64 - 2 * PROP_HEIGHT, postgameMenuInfo.nameOfMVP, UI_CENTER, white );
UI_DrawProportionalString( 320, 480 - 34 - 2 * PROP_HEIGHT, postgameMenuInfo.winTeamMVPText, UI_CENTER, yellow );
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_POINTS], postgameMenuInfo.scoreOfMVP);
UI_DrawProportionalString( 320, 480 - 14 - 2 * PROP_HEIGHT, buf, UI_CENTER, yellow );
// SPECIAL TEAM STATS BAR ON RIGHT SIDE OF SCREEN
//-----------------------------------------------
//
// THE TOP BAR
y=130;
if (cgs.gametype == GT_CTF)
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_GAME_CAPTUREFLAG] );
else
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_GAME_TEAMHOLOMATCH] );
len = UI_ProportionalStringWidth( buf, UI_SMALLFONT );
trap_R_SetColor( colorTable[CT_DKORANGE] );
CG_DrawPic( 640-32, y+20, 16, -32, cgs.media.corner_8_16_b );
CG_FillRect(640-80, y+1, 48, 15, colorTable[CT_DKORANGE]);
UI_DrawProportionalString( 640-82, y, buf, UI_RIGHT, colorTable[CT_DKORANGE] );
trap_R_SetColor( colorTable[CT_DKORANGE] );
CG_DrawPic( 640-80-len-5, y+1, -14, 20, cgs.media.scoreboardEndcap );
yfrom = y+20;
y+=20;
Com_sprintf( buf, sizeof(buf), "%s", postgameMenuInfo.winTeamText);
UI_DrawProportionalString( 640-34, y, buf, UI_BIGFONT|UI_RIGHT, yellow );
y+=35;
if (cgs.gametype == GT_CTF)
{
// HOW MANY CAPUTRES???
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_CAPTURES], postgameMenuInfo.totalCaptures);
UI_DrawProportionalString( 640-34, y, buf, UI_RIGHT, white );
y+=20;
}
// AND THE POINTS???
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_POINTS], postgameMenuInfo.totalPoints);
UI_DrawProportionalString( 640-34, y, buf, UI_RIGHT, white );
y+=30;
// THE SIDE BAR
CG_FillRect( 640-16-12, yfrom, 8, y-yfrom, colorTable[CT_DKORANGE]);
// THE MIDDLE BARS
CG_FillRect( 640-115, y, 95, 20, colorTable[CT_DKORANGE]);
y+=3;
if (postgameMenuInfo.playerGameRank==2)
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_TEAMS_TIED]);
else
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_VICTOR]);
UI_DrawProportionalString( 640-34, y, buf, UI_RIGHT, colorTable[CT_BLACK] );
y+=20;
y+=30;
yfrom=y;
CG_FillRect( 640-115, y, 95, 20, colorTable[CT_DKORANGE]);
y+=3;
if (postgameMenuInfo.playerGameRank==2)
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_TEAMS_TIED]);
else
Com_sprintf( buf, sizeof(buf), "%s", ingame_text[IGT_DEFEATED]);
UI_DrawProportionalString( 640-34, y, buf, UI_RIGHT, colorTable[CT_BLACK] );
y+=25;
// LOSING TEAM NAME
Com_sprintf( buf, sizeof(buf), "%s", postgameMenuInfo.losTeamText);
UI_DrawProportionalString( 640-34, y, buf, UI_BIGFONT|UI_RIGHT, yellow );
y+=35;
if (cgs.gametype == GT_CTF)
{
// HOW MANY CAPUTRES???
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_CAPTURES], postgameMenuInfo.losCaptures);
UI_DrawProportionalString( 640-34, y, buf, UI_RIGHT, white );
y+=20;
}
// AND THE POINTS???
Com_sprintf( buf, sizeof(buf), "%s %i", ingame_text[IGT_POINTS], postgameMenuInfo.losPoints);
UI_DrawProportionalString( 640-34, y, buf, UI_RIGHT, white );
y+=20;
// THE SIDE BAR
CG_FillRect( 640-16-12, yfrom, 8, y-yfrom, colorTable[CT_DKORANGE]);
// THE BOTTOM BAR
trap_R_SetColor( colorTable[CT_DKORANGE] );
CG_DrawPic( 640-32, y, 16, 32, cgs.media.corner_8_16_b );
CG_FillRect(640-100, y+4, 68, 15, colorTable[CT_DKORANGE]);
trap_R_SetColor( colorTable[CT_DKORANGE] );
CG_DrawPic( 640-100-2, y+4, -14, 20, cgs.media.scoreboardEndcap );
yfrom = y+20;
y+=20;
UI_DrawProportionalString( 130, 480 - 64 - PROP_HEIGHT, postgameMenuInfo.placeNames[1], UI_CENTER, white );
UI_DrawProportionalString( 130, 480 - 38 - PROP_HEIGHT, ingame_text[IGT_2ND], UI_CENTER, yellow );
}
UI_DrawProportionalString( 320, 480 - 64 - 2 * PROP_HEIGHT, postgameMenuInfo.placeNames[0], UI_CENTER, white );
UI_DrawProportionalString( 320, 480 - 38 - 2 * PROP_HEIGHT, ingame_text[IGT_1ST], UI_CENTER, yellow );
}
@ -1967,11 +1547,8 @@ void AW_SPPostgameMenu_f( void ) {
postgameMenuInfo.scoreOfMVP = atoi( CG_Argv(numNames + postgameMenuInfo.numAwards + 4));
postgameMenuInfo.totalCaptures = atoi( CG_Argv(numNames + postgameMenuInfo.numAwards + 5));
postgameMenuInfo.totalPoints = atoi( CG_Argv(numNames + postgameMenuInfo.numAwards + 6));
if (cgs.gametype <= GT_SINGLE_PLAYER)
{
postgameMenuInfo.playerGameRank = atoi( CG_Argv(numNames + postgameMenuInfo.numAwards + 7));
playerGameRank = postgameMenuInfo.playerGameRank;
}
postgameMenuInfo.playerGameRank = atoi( CG_Argv(numNames + postgameMenuInfo.numAwards + 7));
playerGameRank = postgameMenuInfo.playerGameRank;
postgameMenuInfo.playerTied = atoi( CG_Argv(numNames + postgameMenuInfo.numAwards + 8));
postgameMenuInfo.losCaptures = atoi( CG_Argv(numNames + postgameMenuInfo.numAwards + 9));
postgameMenuInfo.losPoints = atoi( CG_Argv(numNames + postgameMenuInfo.numAwards + 10));
@ -2001,58 +1578,46 @@ void AW_SPPostgameMenu_f( void ) {
{
postgameMenuInfo.commendationsSound = 0;
}
if (cgs.gametype <= GT_SINGLE_PLAYER) // for FFA, TOURNAMENT, and SINGLE_PLAYER TOURNAMENT:
{
if ( playerGameRank != 0 )
{ // Someone else wins
char *skin;
if ( playerGameRank != 0 )
{ // Someone else wins
char *skin;
skin = cgs.clientinfo[clNum[0]].skinName;
skin = cgs.clientinfo[clNum[0]].skinName;
if( Q_stricmp( skin, "default" ) == 0 ) {
skin = cgs.clientinfo[clNum[0]].modelName;
}
if( Q_stricmp( skin, "red" ) == 0 ) {
skin = cgs.clientinfo[clNum[0]].modelName;
}
if( Q_stricmp( skin, "blue" ) == 0 ) {
skin = cgs.clientinfo[clNum[0]].modelName;
}
postgameMenuInfo.winnerSound = trap_S_RegisterSound( va( "sound/voice/computer/misc/%s_wins.wav", skin ) );
if (0 == postgameMenuInfo.winnerSound)
{
postgameMenuInfo.winnerSound = trap_S_RegisterSound( va( "%s", "sound/voice/computer/misc/progcomp.wav" ) );
}
postgameMenuInfo.winnerDelay = 2500;
if (1 == playerGameRank || postgameMenuInfo.playerTied==2)
{
postgameMenuInfo.youPlacedSound = trap_S_RegisterSound("sound/voice/computer/misc/2nd.wav");
}
else if (2 == playerGameRank || postgameMenuInfo.playerTied==3)
{
postgameMenuInfo.youPlacedSound = trap_S_RegisterSound("sound/voice/computer/misc/3rd.wav");
}
else
{
postgameMenuInfo.youPlacedSound = trap_S_RegisterSound("sound/voice/computer/misc/notPlace.wav");
}
// You lost, you get to listen to loser music.
// This might be a bit of a downer in FFA, since far more often than not you are not the winner...
// However, in this case the track is NOT a funeral march with an opera singer bellowing "LOSER, LOSER, LOSER, HA HA".
// SOOOOOO for consistency's sake, you will always hear the "loss" track when you don't win. --Pat
trap_S_StartBackgroundTrack( "music/loss", "music/loss" );
if( Q_stricmp( skin, "default" ) == 0 ) {
skin = cgs.clientinfo[clNum[0]].modelName;
}
else
{ // You win
postgameMenuInfo.winnerSound = trap_S_RegisterSound( "sound/voice/computer/misc/youwin.wav" );
postgameMenuInfo.youPlacedSound = 0;
postgameMenuInfo.winnerDelay = 500;
// You won, you get to listen to the winner music.
trap_S_StartBackgroundTrack( "music/win", "music/win" );
if( Q_stricmp( skin, "red" ) == 0 ) {
skin = cgs.clientinfo[clNum[0]].modelName;
}
if( Q_stricmp( skin, "blue" ) == 0 ) {
skin = cgs.clientinfo[clNum[0]].modelName;
}
postgameMenuInfo.winnerSound = trap_S_RegisterSound( va( "sound/voice/computer/misc/%s_wins.wav", skin ) );
if (0 == postgameMenuInfo.winnerSound)
{
postgameMenuInfo.winnerSound = trap_S_RegisterSound( va( "%s", "sound/voice/computer/misc/progcomp.wav" ) );
}
postgameMenuInfo.winnerDelay = 2500;
if (1 == playerGameRank || postgameMenuInfo.playerTied==2)
{
postgameMenuInfo.youPlacedSound = trap_S_RegisterSound("sound/voice/computer/misc/2nd.wav");
}
else if (2 == playerGameRank || postgameMenuInfo.playerTied==3)
{
postgameMenuInfo.youPlacedSound = trap_S_RegisterSound("sound/voice/computer/misc/3rd.wav");
}
else
{
postgameMenuInfo.youPlacedSound = trap_S_RegisterSound("sound/voice/computer/misc/notPlace.wav");
}
// You lost, you get to listen to loser music.
// This might be a bit of a downer in FFA, since far more often than not you are not the winner...
// However, in this case the track is NOT a funeral march with an opera singer bellowing "LOSER, LOSER, LOSER, HA HA".
// SOOOOOO for consistency's sake, you will always hear the "loss" track when you don't win. --Pat
trap_S_StartBackgroundTrack( "music/loss", "music/loss" );
}
else // for TEAM, and CAPTURE THE FLAG:
{

View file

@ -455,7 +455,7 @@ static void CG_MapRestart( void ) {
// we really should clear more parts of cg here and stop sounds
// play the "fight" sound if this is a restart without warmup
if ( cg.warmup == 0 /* && cgs.gametype == GT_TOURNAMENT */)
if ( cg.warmup == 0 )
{
trap_S_StartLocalSound( cgs.media.countFightSound, CHAN_ANNOUNCER );
}