]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Tweak it further
authorMario <mario@smbclan.net>
Tue, 30 Aug 2016 18:40:27 +0000 (04:40 +1000)
committerMario <mario@smbclan.net>
Tue, 30 Aug 2016 18:40:27 +0000 (04:40 +1000)
qcsrc/common/monsters/sv_monsters.qc

index 1f350f1ececbac4053e4644e1028531667789556..3b2286935d6290c150da08c80c6b7fd285aedaa2 100644 (file)
@@ -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)