]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Fix monsters always using infront
authorMario <mario.mario@y7mail.com>
Mon, 2 Sep 2013 00:39:33 +0000 (10:39 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 2 Sep 2013 00:39:33 +0000 (10:39 +1000)
qcsrc/common/monsters/sv_monsters.qc
qcsrc/common/monsters/sv_monsters.qh

index 3591fe80ba57149fee33173a7565d1ee89958ea2..ad35f4db5d5cf88a01627b537bf20fef574398ab 100644 (file)
@@ -486,8 +486,7 @@ vector monster_pickmovetarget(entity targ)
                {
                        self.monster_movestate = MONSTER_MOVE_OWNER;
                        self.last_trace = time + 0.3;
-                       if(self.monster_owner)
-                               return self.monster_owner.origin;
+                       return (self.monster_owner) ? self.monster_owner.origin : self.origin;
                }
                case MONSTER_MOVE_SPAWNLOC:
                {
index 1f210235f5f7be8a0070dcb78e465926019fcfe3..e929defe83778d04d2c7106cabcd8ebf2da05420 100644 (file)
@@ -59,7 +59,7 @@ const float MONSTERSKILL_NOTHARD = 1024; // monster will not spawn on skill >= 3
 const float MONSTERFLAG_APPEAR = 2; // delay spawn until triggered
 const float MONSTERFLAG_NORESPAWN = 4;
 const float MONSTERFLAG_FLY_VERTICAL = 8; // fly/swim vertically
-const float MONSTERFLAG_INFRONT = 16; // only check for enemies infront of us
+const float MONSTERFLAG_INFRONT = 32; // only check for enemies infront of us
 const float MONSTERFLAG_MINIBOSS = 64;  // monster spawns as mini-boss (also has a chance of naturally becoming one)
 const float MONSTERFLAG_SPAWNED = 16384; // flag for spawned monsters