From: Mario Date: Tue, 30 Aug 2016 18:40:27 +0000 (+1000) Subject: Tweak it further X-Git-Tag: xonotic-v0.8.2~639 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=e2468b29fc4dd7ffbf9b0df5dbcf9470d51e0d6c;p=xonotic%2Fxonotic-data.pk3dir.git Tweak it further --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 1f350f1ec..3b2286935 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -99,10 +99,13 @@ bool Monster_ValidTarget(entity this, entity targ) return false; } - traceline(this.origin + this.view_ofs, targ.origin, 0, this); + traceline(this.origin + this.view_ofs, targ.origin, MOVE_NORMAL, this); - if((trace_fraction < 1) && (trace_ent != targ && !autocvar_g_monsters_ignoretraces)) - return false; + if(trace_fraction < 1) + return false; // solid + + if(trace_ent != targ && !autocvar_g_monsters_ignoretraces) + return false; // not our enemy if(autocvar_g_monsters_target_infront || (this.spawnflags & MONSTERFLAG_INFRONT)) if(this.enemy != targ)