Update of /cvsroot/netrek/client/netrekxp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10053/src Modified Files: local.c sound.c Log Message: New sound for starbases exploding. Index: local.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/local.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- local.c 29 Apr 2006 19:22:38 -0000 1.15 +++ local.c 29 Apr 2006 21:00:43 -0000 1.16 @@ -46,7 +46,6 @@ static int sound_plasma = 0; static int sound_other_plasmas = 0; static int num_other_plasmas = 0; -static int sound_other_explode = 0; static unsigned int sound_flags = 0; static int other_torp_dist = 0; static int new_other_torp_dist = 0; @@ -993,7 +992,12 @@ if (newSound) { if (myPlayer(j) || isObsLockPlayer(j)) - Play_Sound(EXPLOSION_WAV); + { + if (j->p_ship.s_type == STARBASE) + Play_Sound(BASE_EXPLOSION_WAV); + else + Play_Sound(EXPLOSION_WAV); + } else { int newdx, newdy, distance, angle; @@ -1011,14 +1015,30 @@ angle = 270 - angle; // At short distances, don't use angular sound if (distance < SCALE/2) - Play_Sound(EXPLOSION_OTHER_WAV); + { + if (j->p_ship.s_type == STARBASE) + Play_Sound(BASE_EXPLOSION_WAV); + else + Play_Sound(EXPLOSION_OTHER_WAV); + } else - Play_Sound_Loc(EXPLOSION_OTHER_WAV, angle, distance); + { + if (j->p_ship.s_type == STARBASE) + Play_Sound_Loc(BASE_EXPLOSION_WAV, angle, distance); + else + Play_Sound_Loc(EXPLOSION_OTHER_WAV, angle, distance); + } } } else - Play_Sound((myPlayer(j) || isObsLockPlayer(j)) - ? EXPLOSION_SOUND : OTHER_EXPLOSION_SOUND); + { + if (j->p_ship.s_type == STARBASE) + Play_Sound(BASE_EXPLOSION_SOUND); + else if (myPlayer(j) || isObsLockPlayer(j)) + Play_Sound(EXPLOSION_SOUND); + else + Play_Sound(OTHER_EXPLOSION_SOUND); + } } #endif Index: sound.c =================================================================== RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- sound.c 27 Apr 2006 22:38:42 -0000 1.8 +++ sound.c 29 Apr 2006 21:00:43 -0000 1.9 @@ -47,6 +47,7 @@ {"nt_phaser", 9, 1}, {"nt_fire_plasma", 9, 1}, {"nt_explosion", 10, 1}, + {"nt_base_explosion", 10, 1}, {"nt_cloaked", 7, 1}, {"nt_uncloak", 7, 1}, {"nt_shield_down", 3, 1}, @@ -100,6 +101,7 @@ newsounds[ENTER_WARP_WAV] = Mix_LoadWAV(DATAFILE("nt_enter_warp.wav")); newsounds[EXIT_WARP_WAV] = Mix_LoadWAV(DATAFILE("nt_exit_warp.wav")); newsounds[EXPLOSION_WAV] = Mix_LoadWAV(DATAFILE("nt_explosion.wav")); + newsounds[BASE_EXPLOSION_WAV] = Mix_LoadWAV(DATAFILE("nt_base_explosion.wav")); newsounds[EXPLOSION_OTHER_WAV] = Mix_LoadWAV(DATAFILE("nt_explosion_other.wav")); newsounds[FIRE_PLASMA_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_plasma.wav")); newsounds[OTHER_FIRE_PLASMA_WAV] = Mix_LoadWAV(DATAFILE("nt_fire_plasma_other.wav")); @@ -407,6 +409,9 @@ case EXPLOSION_SOUND: sprintf (buf, "Explosion sound is %s", flag); break; + case BASE_EXPLOSION_SOUND: + sprintf (buf, "Base explosion sound is %s", flag); + break; case FIRE_TORP_SOUND: sprintf (buf, "Fire torp sound is %s", flag); break;