Update of /cvsroot/netrek/client/netrekxp/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7632/src

Modified Files:
	dmessage.c short.c sound.c 
Log Message:
Added sound for when someone dies to plasma (SMACK FATALITY!)

Index: short.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/short.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- short.c	21 Apr 2006 12:00:07 -0000	1.4
+++ short.c	1 May 2006 00:55:11 -0000	1.5
@@ -1526,7 +1526,7 @@
             }
             if (why_dead)
             {
-				add_whydead (msg.mesg, karg5);
+		add_whydead (msg.mesg, karg5);
                 karg5 = 0;
             }
 #endif

Index: dmessage.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/dmessage.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- dmessage.c	26 Apr 2006 02:04:24 -0000	1.5
+++ dmessage.c	1 May 2006 00:55:11 -0000	1.6
@@ -209,9 +209,22 @@
         else if ((flags == kill) || (flags == killp) ||
                  (flags == killa) || (flags == bomb))
         {
-            W_MessageAllowedWindows (WAM_KILL, 0, 0, color, message, len, 0);
             if (!reportKills)
                 return;         /* HW */
+                
+            W_MessageAllowedWindows (WAM_KILL, 0, 0, color, message, len, 0);
+            
+#ifdef SOUND          
+            if (why_dead &&
+               (instr (message, "[plasma]") || instr (message, "[zapped plasma]")))
+            {
+            	if (newSound)
+            	    Play_Sound(PLASMA_KILL_WAV);
+            	else          	
+            	    Play_Sound(PLASMA_KILL_SOUND);
+            }
+#endif
+
         }
 
         else if (flags & MINDIV)
@@ -258,9 +271,22 @@
               instr (message, "Credit for")) ||
             (*message != ' ' && instr (message, "We are being attacked")))
         {
-            W_MessageAllowedWindows (WAM_KILL, 0, 0, color, message, len, 0);
             if (!reportKills)
                 return;
+            
+            W_MessageAllowedWindows (WAM_KILL, 0, 0, color, message, len, 0);
+            
+#ifdef SOUND          
+            if (why_dead &&
+               (instr (message, "[plasma]") || instr (message, "[zapped plasma]")))
+            {
+            	if (newSound)
+            	    Play_Sound(PLASMA_KILL_WAV);
+            	else          	
+            	    Play_Sound(PLASMA_KILL_SOUND);
+            }
+#endif
+
             if (logging)
             {
                 if (logFile != NULL)

Index: sound.c
===================================================================
RCS file: /cvsroot/netrek/client/netrekxp/src/sound.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- sound.c	29 Apr 2006 22:48:07 -0000	1.10
+++ sound.c	1 May 2006 00:55:11 -0000	1.11
@@ -32,6 +32,7 @@
 /* Each sound has a priority which controls what can override what
    Currently these are set as follows:
 
+   11: death sounds
    10: explosion
    9: phaser,plasma
    8: torp/plasma hit
@@ -59,6 +60,7 @@
     {"nt_enter_ship", 4, 1},
     {"nt_self_destruct", 6, 1},
     {"nt_plasma_hit", 8, 1},
+    {"nt_plasma_kill", 11, 1},
     {"nt_enter_warp", 4, 1},
     {"nt_exit_warp", 4, 1},
     {"nt_message", 4, 1},
@@ -112,6 +114,7 @@
   newsounds[PHASER_WAV] = Mix_LoadWAV(DATAFILE("nt_phaser.wav"));
   newsounds[PHASER_OTHER_WAV] = Mix_LoadWAV(DATAFILE("nt_phaser_other.wav"));
   newsounds[PLASMA_HIT_WAV] = Mix_LoadWAV(DATAFILE("nt_plasma_hit.wav"));
+  newsounds[PLASMA_KILL_WAV] = Mix_LoadWAV(DATAFILE("nt_plasma_kill.wav"));
   newsounds[RED_ALERT_WAV] = Mix_LoadWAV(DATAFILE("nt_red_alert.wav"));
   newsounds[SELF_DESTRUCT_WAV] = Mix_LoadWAV(DATAFILE("nt_self_destruct.wav"));
   newsounds[SHIELD_DOWN_WAV] = Mix_LoadWAV(DATAFILE("nt_shield_down.wav"));
@@ -470,6 +473,9 @@
         case PLASMA_HIT_SOUND:
             sprintf (buf, "Plasma hit sound is %s", flag);
             break;
+        case PLASMA_KILL_SOUND:
+            sprintf (buf, "Plasma kill sound is %s", flag);
+            break;
         }
     }
     else if (i == SOUND_OTHER)