From: Mario Date: Fri, 30 Aug 2013 10:22:49 +0000 (+1000) Subject: Remove monster vehicle targeting X-Git-Tag: xonotic-v0.8.0~241^2^2~129 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a3a64dbd0b7648a3da057da5a2b9feb356d12af8;p=xonotic%2Fxonotic-data.pk3dir.git Remove monster vehicle targeting --- diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index aa0f0d0fb..f3e06ca43 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -67,8 +67,7 @@ float monster_isvalidtarget (entity targ, entity ent) if(vlen(targ.origin - ent.origin) >= ent.target_range) return FALSE; // enemy is too far away - - if not(targ.vehicle_flags & VHF_ISVEHICLE) + if(trace_ent != targ) return FALSE; // we can't see the enemy @@ -84,7 +83,6 @@ float monster_isvalidtarget (entity targ, entity ent) if(IS_SPEC(targ) || IS_OBSERVER(targ)) return FALSE; // enemy is a spectator - if not(targ.vehicle_flags & VHF_ISVEHICLE) // vehicles dont count as alive? if(targ.deadflag != DEAD_NO || ent.deadflag != DEAD_NO || targ.health <= 0 || ent.health <= 0) return FALSE; // enemy/self is dead @@ -94,7 +92,6 @@ float monster_isvalidtarget (entity targ, entity ent) if(targ.monster_owner == ent) return FALSE; // don't attack our pet - if not(targ.vehicle_flags & VHF_ISVEHICLE) if(targ.flags & FL_NOTARGET) return FALSE; // enemy can't be targeted