]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
fix a bunch of compile errors
authorRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 16:10:12 +0000 (18:10 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Sun, 3 Jul 2011 16:10:12 +0000 (18:10 +0200)
qcsrc/common/constants.qh
qcsrc/server/cl_weaponsystem.qc
qcsrc/server/ctf.qc
qcsrc/server/domination.qc
qcsrc/server/g_triggers.qc
qcsrc/server/mutators/gamemode_keepaway.qc
qcsrc/server/mutators/gamemode_keyhunt.qc
qcsrc/server/nexball.qc
qcsrc/server/t_items.qc
qcsrc/server/t_jumppads.qc

index 46de6da20a8d8be11dae29db810d5feb9115da57..c65b9e4226640235afc4587ff59febe166782612 100644 (file)
@@ -457,6 +457,7 @@ float CH_PLAYER = 263;
 float CH_TRIGGER2_SINGLE = 16;
 #endif
 
+#ifdef LEGACY_CHANS
 // this assignment must match menu/xonotic/dialog_settings_misc.c!
 float  CHAN_AUTO                               = 0;
        // on world: announcers, ...                     INFO
@@ -498,6 +499,7 @@ float       CHAN_PLAYER                             = 7; // Player body
        // on players: player sounds                     PLAYER
        // on entities: player sounds                    PLAYER
        // on csqc: UNUSED
+#endif
 
 float  ATTN_NONE                               = 0;
 float  ATTN_MIN                                = 0.015625;
index 8cf41bd2608d33e8b238b22ee6fe0ecd3a7fb1e7..3d7a33278d15201ce89b789f1a03f9441e0d0be8 100644 (file)
@@ -255,7 +255,7 @@ void W_SetupShot_Dir_ProjectileSize_Range(entity ent, vector s_forward, vector m
                (time > ent.prevstrengthsoundattempt + autocvar_sv_strengthsound_antispam_refire_threshold)
        ) // prevent insane sound spam
        {
-               sound(ent, CH_ITEMS, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM);
+               sound(ent, CH_TRIGGER, "weapons/strength_fire.wav", VOL_BASE, ATTN_NORM);
                ent.prevstrengthsound = time;
        }
        ent.prevstrengthsoundattempt = time;
index 21b062958d8adf62338d46523aaa15979122f2ab..d88ae5d375ca8258224b187fd06f428aeaf0bc9f 100644 (file)
@@ -493,7 +493,7 @@ void FlagTouch()
                        }
                }
 
-               sound (other, CH_ITEMS, self.noise2, VOL_BASE, ATTN_NONE);
+               sound (other, CH_TRIGGER, self.noise2, VOL_BASE, ATTN_NONE);
                WaypointSprite_DetachCarrier(other);
                if(self.speedrunning)
                        FakeTimeLimit(other, -1);
@@ -531,7 +531,7 @@ void FlagTouch()
                self.dropperid = other.playerid;
                PlayerScore_Add(other, SP_CTF_PICKUPS, 1);
                LogCTF("steal", self.team, other);
-               sound (other, CH_ITEMS, self.noise, VOL_BASE, ATTN_NONE);
+               sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
 
                FOR_EACH_PLAYER(player)
                        if(player.team == self.team)
@@ -586,7 +586,7 @@ void FlagTouch()
                        }
                        PlayerScore_Add(other, SP_CTF_RETURNS, 1);
                        LogCTF("return", self.team, other);
-                       sound (other, CH_ITEMS, self.noise1, VOL_BASE, ATTN_NONE);
+                       sound (other, CH_TRIGGER, self.noise1, VOL_BASE, ATTN_NONE);
                        ReturnFlag(self);
                }
                else if (!other.flagcarried && (other.playerid != self.dropperid || time > self.ctf_droptime + autocvar_g_balance_ctf_delay_collect))
@@ -618,7 +618,7 @@ void FlagTouch()
                        UpdateFrags(other, f);
                        PlayerScore_Add(other, SP_CTF_PICKUPS, 1);
                        LogCTF("pickup", self.team, other);
-                       sound (other, CH_ITEMS, self.noise, VOL_BASE, ATTN_NONE);
+                       sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NONE);
 
                        FOR_EACH_PLAYER(player)
                                if(player.team == self.team)
index f0123adb0b9596089a4ecaa53f16aa10573c3ec2..a6cc9a88de0ac6d9f90f0775f3673d01d94c753f 100644 (file)
@@ -109,7 +109,7 @@ void dompoint_captured ()
 
        if (head.noise != "")
                if(self.enemy)
-                       sound(self.enemy, CH_ITEMS, head.noise, VOL_BASE, ATTN_NORM);
+                       sound(self.enemy, CH_TRIGGER, head.noise, VOL_BASE, ATTN_NORM);
                else
                        sound(self, CH_TRIGGER_SINGLE, head.noise, VOL_BASE, ATTN_NORM);
        if (head.noise1 != "")
index bf7edbb0f1226b0dc395b13d718d37e3ef9e7bdf..2b96b967a065bd25a959b33c4311177f49cdbac4 100644 (file)
@@ -171,7 +171,7 @@ void multi_trigger()
        }
 
        if (self.noise)
-               sound (self.enemy, CH_ITEMS, self.noise, VOL_BASE, ATTN_NORM);
+               sound (self.enemy, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
 
 // don't trigger again until reset
        self.takedamage = DAMAGE_NO;
@@ -554,7 +554,7 @@ void trigger_heal_touch()
                        {
                                other.health = min(other.health + self.health, self.max_health);
                                other.pauserothealth_finished = max(other.pauserothealth_finished, time + autocvar_g_balance_pause_health_rot);
-                               sound (other, CH_ITEMS, self.noise, VOL_BASE, ATTN_NORM);
+                               sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                        }
                }
        }
@@ -665,7 +665,7 @@ void trigger_gravity_touch()
        {
                other.gravity = g;
                if(self.noise != "")
-                       sound (other, CH_ITEMS, self.noise, VOL_BASE, ATTN_NORM);
+                       sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                UpdateCSQCProjectile(self.owner);
        }
 };
index 2e1d80d7829de733d87fccbb0045fc8556da6ce0..ac6d5dccdb86fa63bcd504b0f1a9bbc13718efc1 100644 (file)
@@ -128,7 +128,7 @@ void ka_TouchEvent() // runs any time that the ball comes in contact with someth
        Send_KillNotification(other.netname, "", "", KA_PICKUPBALL, MSG_KA);
        WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
        WriteString(MSG_BROADCAST, strcat("\n\n", other.netname, "^7 has picked up the ball!\n"));
-       sound(self.owner, CH_ITEMS, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
+       sound(self.owner, CH_TRIGGER, "keepaway/pickedup.wav", VOL_BASE, ATTN_NONE); // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
        PlayerScore_Add(other, SP_KEEPAWAY_PICKUPS, 1);
@@ -170,7 +170,7 @@ void ka_DropEvent(entity plyr) // runs any time that a player is supposed to los
        Send_KillNotification(plyr.netname, "", "", KA_DROPBALL, MSG_KA);
        WriteByte(MSG_BROADCAST, SVC_CENTERPRINT);
        WriteString(MSG_BROADCAST, strcat("\n\n", plyr.netname, "^7 has dropped the ball!\n"));
-       sound(plyr, CH_ITEMS, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);     // ATTN_NONE (it's a sound intended to be heard anywhere) 
+       sound(plyr, CH_TRIGGER, "keepaway/dropped.wav", VOL_BASE, ATTN_NONE);   // ATTN_NONE (it's a sound intended to be heard anywhere) 
        
        // scoring
        // PlayerScore_Add(plyr, SP_KEEPAWAY_DROPS, 1); Not anymore, this is 100% the same as pickups and is useless.
index 515541fc3a4a6724b2a6e983cd4a676ed3f98633..decada0312d4536537d9ab519b5b46cb822a04c8 100644 (file)
@@ -413,7 +413,7 @@ void kh_Key_Damage(entity inflictor, entity attacker, float damage, float deatht
 
 void kh_Key_Collect(entity key, entity player)  //a player picks up a dropped key
 {
-       sound(player, CH_ITEMS, kh_sound_collect, VOL_BASE, ATTN_NORM);
+       sound(player, CH_TRIGGER, kh_sound_collect, VOL_BASE, ATTN_NORM);
 
        if(key.kh_dropperteam != player.team)
        {
@@ -664,7 +664,7 @@ void kh_Key_Think()  // runs all the time
        {
                if(self.siren_time < time)
                {
-                       sound(self.owner, CH_ITEMS, kh_sound_alarm, VOL_BASE, ATTN_NORM);  // play a simple alarm
+                       sound(self.owner, CH_TRIGGER, kh_sound_alarm, VOL_BASE, ATTN_NORM);  // play a simple alarm
                        self.siren_time = time + 2.5;  // repeat every 2.5 seconds
                }
 
@@ -799,7 +799,7 @@ void kh_Key_DropOne(entity key)
        key.pushltime = time + autocvar_g_balance_keyhunt_protecttime;
        key.kh_dropperteam = key.team;
 
-       sound(player, CH_ITEMS, kh_sound_drop, VOL_BASE, ATTN_NORM);
+       sound(player, CH_TRIGGER, kh_sound_drop, VOL_BASE, ATTN_NORM);
 }
 
 void kh_Key_DropAll(entity player, float suicide) // runs whenever a player dies
@@ -825,7 +825,7 @@ void kh_Key_DropAll(entity player, float suicide) // runs whenever a player dies
                        if(suicide)
                                key.kh_dropperteam = player.team;
                }
-               sound(player, CH_ITEMS, kh_sound_drop, VOL_BASE, ATTN_NORM);
+               sound(player, CH_TRIGGER, kh_sound_drop, VOL_BASE, ATTN_NORM);
        }
 }
 
index e2f4d5a8a1bc57660cc144f843f685010e437c4c..3ee7b5597d82d3752c55927d52d6bd389b775478 100644 (file)
@@ -604,7 +604,7 @@ void W_Nexball_Touch (void)
                if(!attacker.ballcarried)
                {
                        LogNB("stole", attacker);
-                       sound (other, CH_ITEMS, ball.noise2, VOL_BASE, ATTN_NORM);
+                       sound (other, CH_TRIGGER, ball.noise2, VOL_BASE, ATTN_NORM);
 
                        if(attacker.team == other.team && time > attacker.teamkill_complain)
                        {
index b101c0202cc4b59ca3331e710c44c1350b8c2ea8..001063585b107faa2411b76a6500d0f4799e549f 100644 (file)
@@ -447,7 +447,7 @@ float Item_GiveTo(entity item, entity player)
        if (!pickedup)
                return 0;
 
-       sound (player, CH_ITEMS, item.item_pickupsound, VOL_BASE, ATTN_NORM);
+       sound (player, CH_TRIGGER, item.item_pickupsound, VOL_BASE, ATTN_NORM);
        if (_switchweapon)
                if (player.switchweapon != w_getbestweapon(player))
                        W_SwitchWeapon_Force(player, w_getbestweapon(player));
@@ -1532,12 +1532,12 @@ void GiveSound(entity e, float v0, float v1, float t, string snd_incr, string sn
        if(v1 <= v0 - t)
        {
                if(snd_decr != "")
-                       sound (e, CH_ITEMS, snd_decr, VOL_BASE, ATTN_NORM);
+                       sound (e, CH_TRIGGER, snd_decr, VOL_BASE, ATTN_NORM);
        }
        else if(v0 >= v0 + t)
        {
                if(snd_incr != "")
-                       sound (e, CH_ITEMS, snd_incr, VOL_BASE, ATTN_NORM);
+                       sound (e, CH_TRIGGER, snd_incr, VOL_BASE, ATTN_NORM);
        }
 }
 
index d12379d64354faeb935d9dc5ffc5c48be7bb71f4..18dbef1711424dd28e5864c58fc0adc0d30d2112 100644 (file)
@@ -155,7 +155,7 @@ void trigger_push_touch()
                {
                        // flash when activated
                        pointparticles(particleeffectnum("jumppad_activate"), other.origin, other.velocity, 1);
-                       sound (other, CH_ITEMS, self.noise, VOL_BASE, ATTN_NORM);
+                       sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                        self.pushltime = time + 0.2;
                }
                local float ct;