]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_jumppads.qc
Rewrite of vote code.
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_jumppads.qc
index 1e72b765a0a0b548de052f9d31accdfc8e906b0c..18dbef1711424dd28e5864c58fc0adc0d30d2112 100644 (file)
@@ -10,7 +10,7 @@ float trigger_push_calculatevelocity_flighttime;
 
 void trigger_push_use()
 {
-       if(teams_matter)
+       if(teamplay)
                self.team = activator.team;
 }
 
@@ -130,18 +130,7 @@ void trigger_push_touch()
        if (self.active == ACTIVE_NOT)
                return;
 
-       // FIXME: add a .float for whether an entity should be tossed by jumppads
-       if (!other.iscreature)
-       if (other.classname != "corpse")
-       if (other.classname != "body")
-       if (other.classname != "gib")
-       if (other.classname != "casing")
-       if (other.classname != "droppedweapon")
-       if (other.classname != "keepawayball")
-       if (!other.projectiledeathtype || other.classname == "bullet")
-               return;
-
-       if (other.deadflag && other.iscreature)
+       if (!isPushable(other))
                return;
 
        if(self.team)
@@ -166,7 +155,7 @@ void trigger_push_touch()
                {
                        // flash when activated
                        pointparticles(particleeffectnum("jumppad_activate"), other.origin, other.velocity, 1);
-                       sound (other, CHAN_AUTO, self.noise, VOL_BASE, ATTN_NORM);
+                       sound (other, CH_TRIGGER, self.noise, VOL_BASE, ATTN_NORM);
                        self.pushltime = time + 0.2;
                }
                local float ct;