From c1b1c43436ea9ec55a38e0595218618324d6955b Mon Sep 17 00:00:00 2001 From: Mario Date: Mon, 2 Sep 2013 10:25:40 +1000 Subject: [PATCH] Lower enemy check delay so the monster isn't sitting idling too long when a player approaches --- qcsrc/common/monsters/sv_monsters.qc | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index dd080160e..81463e110 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -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) -- 2.39.2