mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-11-10 06:31:47 +00:00
Play correct team sounds when in spectator mode and following a player.
This commit is contained in:
parent
cf30922932
commit
0a8eb09834
1 changed files with 10 additions and 10 deletions
|
@ -1033,19 +1033,19 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
DEBUGNAME("EV_GLOBAL_TEAM_SOUND");
|
||||
switch( es->eventParm ) {
|
||||
case GTS_RED_CAPTURE: // CTF: red team captured the blue flag, 1FCTF: red team captured the neutral flag
|
||||
if ( cgs.clientinfo[cg.clientNum].team == TEAM_RED )
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED )
|
||||
CG_AddBufferedSound( cgs.media.captureYourTeamSound );
|
||||
else
|
||||
CG_AddBufferedSound( cgs.media.captureOpponentSound );
|
||||
break;
|
||||
case GTS_BLUE_CAPTURE: // CTF: blue team captured the red flag, 1FCTF: blue team captured the neutral flag
|
||||
if ( cgs.clientinfo[cg.clientNum].team == TEAM_BLUE )
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE )
|
||||
CG_AddBufferedSound( cgs.media.captureYourTeamSound );
|
||||
else
|
||||
CG_AddBufferedSound( cgs.media.captureOpponentSound );
|
||||
break;
|
||||
case GTS_RED_RETURN: // CTF: blue flag returned, 1FCTF: never used
|
||||
if ( cgs.clientinfo[cg.clientNum].team == TEAM_RED )
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED )
|
||||
CG_AddBufferedSound( cgs.media.returnYourTeamSound );
|
||||
else
|
||||
CG_AddBufferedSound( cgs.media.returnOpponentSound );
|
||||
|
@ -1053,7 +1053,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
CG_AddBufferedSound( cgs.media.blueFlagReturnedSound );
|
||||
break;
|
||||
case GTS_BLUE_RETURN: // CTF red flag returned, 1FCTF: neutral flag returned
|
||||
if ( cgs.clientinfo[cg.clientNum].team == TEAM_BLUE )
|
||||
if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE )
|
||||
CG_AddBufferedSound( cgs.media.returnYourTeamSound );
|
||||
else
|
||||
CG_AddBufferedSound( cgs.media.returnOpponentSound );
|
||||
|
@ -1066,7 +1066,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
if (cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) {
|
||||
}
|
||||
else {
|
||||
if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
|
||||
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) {
|
||||
#ifdef MISSIONPACK
|
||||
if (cgs.gametype == GT_1FCTF)
|
||||
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
|
||||
|
@ -1074,7 +1074,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
#endif
|
||||
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
|
||||
}
|
||||
else if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
|
||||
else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) {
|
||||
#ifdef MISSIONPACK
|
||||
if (cgs.gametype == GT_1FCTF)
|
||||
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
|
||||
|
@ -1089,7 +1089,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
if (cg.snap->ps.powerups[PW_REDFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) {
|
||||
}
|
||||
else {
|
||||
if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
|
||||
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) {
|
||||
#ifdef MISSIONPACK
|
||||
if (cgs.gametype == GT_1FCTF)
|
||||
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
|
||||
|
@ -1097,7 +1097,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
#endif
|
||||
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
|
||||
}
|
||||
else if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
|
||||
else if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) {
|
||||
#ifdef MISSIONPACK
|
||||
if (cgs.gametype == GT_1FCTF)
|
||||
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
|
||||
|
@ -1109,12 +1109,12 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
|||
break;
|
||||
#ifdef MISSIONPACK
|
||||
case GTS_REDOBELISK_ATTACKED: // Overload: red obelisk is being attacked
|
||||
if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
|
||||
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) {
|
||||
CG_AddBufferedSound( cgs.media.yourBaseIsUnderAttackSound );
|
||||
}
|
||||
break;
|
||||
case GTS_BLUEOBELISK_ATTACKED: // Overload: blue obelisk is being attacked
|
||||
if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
|
||||
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) {
|
||||
CG_AddBufferedSound( cgs.media.yourBaseIsUnderAttackSound );
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue