]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/t_jumppads.qc
minelayer sprite
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / t_jumppads.qc
index 4faba6d71c4aa288b55527721711721a019377e7..36048e860129a1d79030939b3d8c2238828a8062 100644 (file)
@@ -35,7 +35,7 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht)
 
        torg = tgt.origin + (tgt.mins + tgt.maxs) * 0.5;
 
-       grav = cvar("sv_gravity");
+       grav = autocvar_sv_gravity;
 
        zdist = torg_z - org_z;
        sdist = vlen(torg - org - zdist * '0 0 1');
@@ -127,6 +127,9 @@ vector trigger_push_calculatevelocity(vector org, entity tgt, float ht)
 
 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")
@@ -134,6 +137,7 @@ void trigger_push_touch()
        if (other.classname != "gib")
        if (other.classname != "casing")
        if (other.classname != "droppedweapon")
+       if (other.classname != "keepawayball")
        if (!other.projectiledeathtype || other.classname == "bullet")
                return;
 
@@ -152,7 +156,6 @@ void trigger_push_touch()
        other.flags &~= FL_ONGROUND;
 
        other.velocity = self.movedir;
-       other.jumppadusetime = time;
 
        if (other.classname == "player")
        {
@@ -230,7 +233,6 @@ void trigger_push_touch()
 };
 
 .vector dest;
-
 void trigger_push_findtarget()
 {
        local entity e;
@@ -284,11 +286,11 @@ void trigger_push_findtarget()
  */
 void spawnfunc_trigger_push()
 {
-       if (self.angles != '0 0 0')
-               SetMovedir ();
+       SetMovedir ();
 
        EXACTTRIGGER_INIT;
-
+       
+       self.active = ACTIVE_ACTIVE;    
        self.use = trigger_push_use;
        self.touch = trigger_push_touch;