]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix a crash caused by stupid maps
authorMario <mario@smbclan.net>
Mon, 2 Jan 2017 02:37:42 +0000 (12:37 +1000)
committerMario <mario@smbclan.net>
Mon, 2 Jan 2017 02:37:42 +0000 (12:37 +1000)
qcsrc/common/triggers/trigger/jumppads.qc

index 5a279561d374c5c6b0d975e3a4105b5e2f322787..746270877b5018930d3f6e1d5c32abe05553f62c 100644 (file)
@@ -222,7 +222,7 @@ bool jumppad_push(entity this, entity targ)
        }
 
        if(this.enemy.target)
-               SUB_UseTargets(this.enemy, targ, targ); // TODO: do we need targ as trigger too?
+               SUB_UseTargets(this.enemy, targ, this);
 
        if (targ.flags & FL_PROJECTILE)
        {
@@ -418,6 +418,9 @@ bool target_push_send(entity this, entity to, float sf)
 
 void target_push_use(entity this, entity actor, entity trigger)
 {
+       if(trigger.classname == "trigger_push" || trigger == this)
+               return; // WTF, why is this a thing
+
        jumppad_push(this, actor);
 }