mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-23 12:32:09 +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");
|
DEBUGNAME("EV_GLOBAL_TEAM_SOUND");
|
||||||
switch( es->eventParm ) {
|
switch( es->eventParm ) {
|
||||||
case GTS_RED_CAPTURE: // CTF: red team captured the blue flag, 1FCTF: red team captured the neutral flag
|
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 );
|
CG_AddBufferedSound( cgs.media.captureYourTeamSound );
|
||||||
else
|
else
|
||||||
CG_AddBufferedSound( cgs.media.captureOpponentSound );
|
CG_AddBufferedSound( cgs.media.captureOpponentSound );
|
||||||
break;
|
break;
|
||||||
case GTS_BLUE_CAPTURE: // CTF: blue team captured the red flag, 1FCTF: blue team captured the neutral flag
|
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 );
|
CG_AddBufferedSound( cgs.media.captureYourTeamSound );
|
||||||
else
|
else
|
||||||
CG_AddBufferedSound( cgs.media.captureOpponentSound );
|
CG_AddBufferedSound( cgs.media.captureOpponentSound );
|
||||||
break;
|
break;
|
||||||
case GTS_RED_RETURN: // CTF: blue flag returned, 1FCTF: never used
|
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 );
|
CG_AddBufferedSound( cgs.media.returnYourTeamSound );
|
||||||
else
|
else
|
||||||
CG_AddBufferedSound( cgs.media.returnOpponentSound );
|
CG_AddBufferedSound( cgs.media.returnOpponentSound );
|
||||||
|
@ -1053,7 +1053,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
CG_AddBufferedSound( cgs.media.blueFlagReturnedSound );
|
CG_AddBufferedSound( cgs.media.blueFlagReturnedSound );
|
||||||
break;
|
break;
|
||||||
case GTS_BLUE_RETURN: // CTF red flag returned, 1FCTF: neutral flag returned
|
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 );
|
CG_AddBufferedSound( cgs.media.returnYourTeamSound );
|
||||||
else
|
else
|
||||||
CG_AddBufferedSound( cgs.media.returnOpponentSound );
|
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]) {
|
if (cg.snap->ps.powerups[PW_BLUEFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (cgs.clientinfo[cg.clientNum].team == TEAM_BLUE) {
|
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_BLUE) {
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
if (cgs.gametype == GT_1FCTF)
|
if (cgs.gametype == GT_1FCTF)
|
||||||
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
|
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
|
||||||
|
@ -1074,7 +1074,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
#endif
|
#endif
|
||||||
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
|
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
|
#ifdef MISSIONPACK
|
||||||
if (cgs.gametype == GT_1FCTF)
|
if (cgs.gametype == GT_1FCTF)
|
||||||
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
|
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]) {
|
if (cg.snap->ps.powerups[PW_REDFLAG] || cg.snap->ps.powerups[PW_NEUTRALFLAG]) {
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (cgs.clientinfo[cg.clientNum].team == TEAM_RED) {
|
if (cg.snap->ps.persistant[PERS_TEAM] == TEAM_RED) {
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
if (cgs.gametype == GT_1FCTF)
|
if (cgs.gametype == GT_1FCTF)
|
||||||
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
|
CG_AddBufferedSound( cgs.media.yourTeamTookTheFlagSound );
|
||||||
|
@ -1097,7 +1097,7 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
#endif
|
#endif
|
||||||
CG_AddBufferedSound( cgs.media.enemyTookYourFlagSound );
|
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
|
#ifdef MISSIONPACK
|
||||||
if (cgs.gametype == GT_1FCTF)
|
if (cgs.gametype == GT_1FCTF)
|
||||||
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
|
CG_AddBufferedSound( cgs.media.enemyTookTheFlagSound );
|
||||||
|
@ -1109,12 +1109,12 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) {
|
||||||
break;
|
break;
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
case GTS_REDOBELISK_ATTACKED: // Overload: red obelisk is being attacked
|
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 );
|
CG_AddBufferedSound( cgs.media.yourBaseIsUnderAttackSound );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GTS_BLUEOBELISK_ATTACKED: // Overload: blue obelisk is being attacked
|
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 );
|
CG_AddBufferedSound( cgs.media.yourBaseIsUnderAttackSound );
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue