]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Attempt to fix mage teleporting behind walls
authorMario <mario.mario@y7mail.com>
Sun, 13 Oct 2013 00:26:06 +0000 (11:26 +1100)
committerMario <mario.mario@y7mail.com>
Sun, 13 Oct 2013 00:26:06 +0000 (11:26 +1100)
qcsrc/common/monsters/monster/mage.qc

index 9e78ce1ac9c14d483f173743d1c9e52ebb2e85b4..b389a46c9d016a9c0112bcfb9f12231fe473588f 100644 (file)
@@ -249,13 +249,13 @@ void mage_teleport()
                return;
 
        makevectors(self.enemy.angles);
-       tracebox(self.enemy.origin + ((v_forward * -1) * 200), self.mins, self.maxs, self.origin - '0 0 5', MOVE_NORMAL, self);
+       tracebox(self.enemy.origin + ((v_forward * -1) * 200), self.mins, self.maxs, self.origin, MOVE_NOMONSTERS, self);
        
-       if(trace_fraction <= 1)
-       {
-               pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1);
-               setorigin(self, self.enemy.origin + ((v_forward * -1) * 200));
-       }
+       if(trace_fraction < 1)
+               return;
+               
+       pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1);
+       setorigin(self, self.enemy.origin + ((v_forward * -1) * 200));
        
        self.attack_finished_single = time + 0.2;
 }