From: Mario Date: Tue, 30 Aug 2016 18:23:59 +0000 (+1000) Subject: Make monsters not care if their target is behind another, also enable line of sight... X-Git-Tag: xonotic-v0.8.2~640 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=6bdd884aa6a85aed547c4c286e438e1951879805;p=xonotic%2Fxonotic-data.pk3dir.git Make monsters not care if their target is behind another, also enable line of sight tracing --- diff --git a/monsters.cfg b/monsters.cfg index f6eca00d0..66fc72c30 100644 --- a/monsters.cfg +++ b/monsters.cfg @@ -93,6 +93,7 @@ set g_monsters_skill 1 "Monster skill (affecting some of their attributes). 1 - set g_monsters_miniboss_chance 5 set g_monsters_miniboss_healthboost 100 set g_monsters_drop_time 10 +set g_monsters_ignoretraces 1 set g_monsters_owners 1 set g_monsters_teams 1 set g_monsters_score_kill 0 diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index 1fbb410da..1f350f1ec 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -101,7 +101,7 @@ bool Monster_ValidTarget(entity this, entity targ) traceline(this.origin + this.view_ofs, targ.origin, 0, this); - if((trace_fraction < 1) && (trace_ent != targ)) + if((trace_fraction < 1) && (trace_ent != targ && !autocvar_g_monsters_ignoretraces)) return false; if(autocvar_g_monsters_target_infront || (this.spawnflags & MONSTERFLAG_INFRONT)) diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index a8d45bd52..0162470e7 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -405,7 +405,8 @@ float autocvar_g_monsters_respawn_delay; bool autocvar_g_monsters_respawn; float autocvar_g_monsters_armor_blockpercent; float autocvar_g_monsters_healthbars; -float autocvar_g_monsters_lineofsight; +bool autocvar_g_monsters_lineofsight = true; +bool autocvar_g_monsters_ignoretraces = true; #define autocvar_g_bloodloss cvar("g_bloodloss") bool autocvar_g_nades; bool autocvar_g_nades_override_dropweapon = true;