]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
get rid of CHAN_PAIN too
authorRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 15:52:14 +0000 (17:52 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 15:52:14 +0000 (17:52 +0200)
qcsrc/client/gibs.qc
qcsrc/client/vehicles/vehicles.qc
qcsrc/common/constants.qh
qcsrc/server/arena.qc
qcsrc/server/cl_player.qc
qcsrc/server/mode_onslaught.qc
qcsrc/server/vehicles/racer.qc
qcsrc/server/w_electro.qc

index 1f8af46ca16c4178284485bfa93626b416506968..4041bacc1b0ea6921f1cdd08d95750b03c9e5878 100644 (file)
@@ -73,7 +73,7 @@ void Gib_Touch()
        }
 
        if(!self.silent)
-               sound(self, CHAN_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), VOL_BASE, ATTN_NORM);
+               sound(self, CH_PAIN, strcat("misc/gib_splat0", ftos(floor(prandom() * 4 + 1)), ".wav"), VOL_BASE, ATTN_NORM);
        pointparticles(particleeffectnum(strcat(species_prefix(self.cnt), "blood")), self.origin + '0 0 1', '0 0 30', 10);
 
        Gib_Delete();
@@ -192,7 +192,7 @@ void Ent_GibSplash(float isNew)
        {
                case 0x01:
                        if(!issilent)
-                               sound (self, CHAN_PAIN, "misc/gib.wav", VOL_BASE, ATTN_NORM);
+                               sound (self, CH_PAIN, "misc/gib.wav", VOL_BASE, ATTN_NORM);
 
                        if(prandom() < amount)
                                TossGib ("models/gibs/eye.md3", org, vel, prandomvec() * 150, specnum, 0, issilent);
index 514ee9087ac8f682cc75a57158a125b2c67834d2..a06190b3ded7c21dec7800d60693e910e8268107 100644 (file)
@@ -217,7 +217,7 @@ void CSQC_SPIDER_HUD()
         if(alarm1time < time)
         {
             alarm1time = time + 2;
-            sound(world, CHAN_PAIN, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_PAIN, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
         }        
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
     }        
@@ -226,7 +226,7 @@ void CSQC_SPIDER_HUD()
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm1time)
         {
-            sound(world, CHAN_PAIN, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(world, CH_PAIN, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm1time = 0;
         }        
     }
@@ -376,7 +376,7 @@ void CSQC_RAPTOR_HUD()
         if(alarm1time < time)
         {
             alarm1time = time + 2;
-            sound(self, CHAN_PAIN, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
         }
         
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
@@ -386,7 +386,7 @@ void CSQC_RAPTOR_HUD()
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm1time)
         {
-            sound(self, CHAN_PAIN, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm1time = 0;
         }
     }
@@ -566,7 +566,7 @@ void CSQC_WAKIZASHI_HUD()
         if(alarm1time < time)
         {
             alarm1time = time + 2;
-            sound(self, CHAN_PAIN, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(self, CH_PAIN_SINGLE, "vehicles/alarm.wav", VOL_BASEVOICE, ATTN_NONE);
         }
         
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
@@ -576,7 +576,7 @@ void CSQC_WAKIZASHI_HUD()
         drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
         if(alarm1time)
         {
-            sound(self, CHAN_PAIN, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
+            sound(self, CH_PAIN_SINGLE, "misc/null.wav", VOL_BASEVOICE, ATTN_NONE);
             alarm1time = 0;
         }        
     }
index b28f5fe82957d0d5dcec9390d10b7bad01edf0bf..46de6da20a8d8be11dae29db810d5feb9115da57 100644 (file)
@@ -439,18 +439,22 @@ float CH_TRIGGER_SINGLE = 3; // only on players, entities, csqc
 float CH_SHOTS_SINGLE = 4; // only on players, entities, csqc
 float CH_WEAPON_B = 5; // only on players and entities
 float CH_PAIN = 6; // only on players and csqc
+float CH_PAIN_SINGLE = 6; // only on players and csqc
 float CH_PLAYER = 7; // only on players and entities
+float CH_TRIGGER2_SINGLE = 6; // only on entities
 #else
 float CH_INFO = 0;
-float CH_TRIGGER_SINGLE = 3;
-float CH_SHOTS_SINGLE = 4;
 float CH_TRIGGER = 256;
 float CH_WEAPON_A = 257;
 float CH_VOICE = 258;
 float CH_BGM = 260;
+float CH_TRIGGER_SINGLE = 3;
+float CH_SHOTS_SINGLE = 4;
 float CH_WEAPON_B = 257;
 float CH_PAIN = 262;
+float CH_PAIN_SINGLE = 6;
 float CH_PLAYER = 263;
+float CH_TRIGGER2_SINGLE = 16;
 #endif
 
 // this assignment must match menu/xonotic/dialog_settings_misc.c!
index 1e9b837d8c4d61a2b9311a7951218826f30e6ade..c95396332f45106f404c68c2c549dc56b71f6a44 100644 (file)
@@ -70,10 +70,7 @@ void reset_map(float dorespawn)
                        self.team = self.team_saved;
 
                if(self.flags & FL_PROJECTILE) // remove any projectiles left
-               {
-                       stopsound(self, CHAN_PAIN);
                        remove(self);
-               }
        }
 
        // Waypoints and assault start come LAST
index 4f84f94fa02478164e1288a53e1bea05b093e51e..0ba5f1d1055d68605fe6e117585c5e4257dd7fe0 100644 (file)
@@ -498,15 +498,15 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                                        // exclude pain sounds for laserjumps as long as you aren't REALLY low on health and would die of the next two
                                        {
                                                if(deathtype == DEATH_FALL)
-                                                       PlayerSound(playersound_fall, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+                                                       PlayerSound(playersound_fall, CH_PAIN, VOICETYPE_PLAYERSOUND);
                                                else if(self.health > 75) // TODO make a "gentle" version?
-                                                       PlayerSound(playersound_pain100, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+                                                       PlayerSound(playersound_pain100, CH_PAIN, VOICETYPE_PLAYERSOUND);
                                                else if(self.health > 50)
-                                                       PlayerSound(playersound_pain75, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+                                                       PlayerSound(playersound_pain75, CH_PAIN, VOICETYPE_PLAYERSOUND);
                                                else if(self.health > 25)
-                                                       PlayerSound(playersound_pain50, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+                                                       PlayerSound(playersound_pain50, CH_PAIN, VOICETYPE_PLAYERSOUND);
                                                else
-                                                       PlayerSound(playersound_pain25, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+                                                       PlayerSound(playersound_pain25, CH_PAIN, VOICETYPE_PLAYERSOUND);
                                        }
                                }
 
@@ -585,9 +585,9 @@ void PlayerDamage (entity inflictor, entity attacker, float damage, float deatht
                if(sound_allowed(MSG_BROADCAST, attacker))
                {
                        if(deathtype == DEATH_DROWN)
-                               PlayerSound(playersound_drown, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+                               PlayerSound(playersound_drown, CH_PAIN, VOICETYPE_PLAYERSOUND);
                        else
-                               PlayerSound(playersound_death, CHAN_PAIN, VOICETYPE_PLAYERSOUND);
+                               PlayerSound(playersound_death, CH_PAIN, VOICETYPE_PLAYERSOUND);
                }
 
                // get rid of kill indicator
index e130a3b22b0359f5d6663942fcd319090990a7ff..5662f95bd29149fec1b8c2a1385c6e2e71ce50ab 100644 (file)
@@ -1104,9 +1104,9 @@ void onslaught_controlpoint_icon_think()
                pointparticles(particleeffectnum("electricity_sparks"), self.origin + randompos('-10 -10 -20', '10 10 20'), '0 0 0', 1);
 
                if(random() > 0.8)
-                       sound(self, CHAN_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_PAIN, "onslaught/ons_spark1.wav", VOL_BASE, ATTN_NORM);
                else if (random() > 0.5)
-                       sound(self, CHAN_PAIN, "onslaught/ons_spark2.wav", VOL_BASE, ATTN_NORM);
+                       sound(self, CH_PAIN, "onslaught/ons_spark2.wav", VOL_BASE, ATTN_NORM);
        }
 };
 
index 4836cf6666b98767f4d151334cdf5a7fa96b28bf..2f625c144c7fe593e86b954782ac50631bf12568 100644 (file)
@@ -358,13 +358,13 @@ float racer_frame()
         {        
             //self.sounds = 2;
             self.strength_finished = time + 10.922667; //soundlength("vehicles/racer_boost.wav");
-            sound (self, CHAN_PAIN, "vehicles/racer_boost.wav", VOL_VEHICLEENGINE, ATTN_NORM);            
+            sound (self, CH_TRIGGER2_SINGLE, "vehicles/racer_boost.wav", VOL_VEHICLEENGINE, ATTN_NORM);            
         }        
     }
     else
     {
         self.strength_finished = 0;
-        sound (self, CHAN_PAIN, "misc/null.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+        sound (self, CH_TRIGGER2_SINGLE, "misc/null.wav", VOL_VEHICLEENGINE, ATTN_NORM);
     }
         
 
@@ -505,7 +505,7 @@ void racer_exit(float eject)
     self.think      = racer_think;
     self.nextthink  = time;
     self.movetype   = MOVETYPE_TOSS;
-    sound (self, CHAN_PAIN, "misc/null.wav", VOL_VEHICLEENGINE, ATTN_NORM);
+    sound (self, CH_TRIGGER2_SINGLE, "misc/null.wav", VOL_VEHICLEENGINE, ATTN_NORM);
     
     if not (self.owner)
         return;
index 52e26722d786cfa154563865d31a096b4e0bd0c8..fee11254cd8d076c440f4c387f0a89e185c82f3a 100644 (file)
@@ -135,9 +135,6 @@ void W_Electro_Attack()
        setsize(proj, '0 0 -3', '0 0 -3');
        proj.flags = FL_PROJECTILE;
 
-       //sound (proj, CHAN_PAIN, "weapons/electro_fly.wav", VOL_BASE, ATTN_NORM);
-       //sounds bad
-
        CSQCProjectile(proj, TRUE, PROJECTILE_ELECTRO_BEAM, TRUE);
 
        other = proj; MUTATOR_CALLHOOK(EditProjectile);