From: Mario Date: Mon, 2 Sep 2013 00:25:40 +0000 (+1000) Subject: Lower enemy check delay so the monster isn't sitting idling too long when a player... X-Git-Tag: xonotic-v0.8.0~241^2^2~98 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c1b1c43436ea9ec55a38e0595218618324d6955b;p=xonotic%2Fxonotic-data.pk3dir.git Lower enemy check delay so the monster isn't sitting idling too long when a player approaches --- 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)