]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Lower enemy check delay so the monster isn't sitting idling too long when a player...
authorMario <mario.mario@y7mail.com>
Mon, 2 Sep 2013 00:25:40 +0000 (10:25 +1000)
committerMario <mario.mario@y7mail.com>
Mon, 2 Sep 2013 00:25:40 +0000 (10:25 +1000)
qcsrc/common/monsters/sv_monsters.qc

index dd080160e33c91a1f47964f77640eb1879123ca2..81463e11061aa8501dc012d6cf2e16924dfe4524 100644 (file)
@@ -66,12 +66,10 @@ float monster_isvalidtarget (entity targ, entity ent)
        traceline(ent.origin, targ.origin, MOVE_NORMAL, ent);
                
        if(trace_ent != targ)
-       {
-               if(trace_ent != world)
-                       targ = trace_ent;
-               else
-                       return FALSE;
-       }
+       if(trace_ent)
+               targ = trace_ent;
+       else
+               return FALSE;
                
        if(targ.vehicle_flags & VHF_ISVEHICLE)
        if not((get_monsterinfo(ent.monsterid)).spawnflags & MON_FLAG_RANGED)
@@ -653,7 +651,7 @@ void monster_move(float runspeed, float walkspeed, float stopspeed, float manim_
                                //monster_sound(self.msound_sight, 0, FALSE);
                }
                        
-               self.last_enemycheck = time + 2;
+               self.last_enemycheck = time + 0.5;
        }
        
        if(self.state == MONSTER_STATE_ATTACK_MELEE && time >= self.attack_finished_single)