From 825bbad5c854f620b8c182761a0547dfa7346e67 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 1 Sep 2013 05:50:13 +1000 Subject: [PATCH] Clean up monster_use function a little --- qcsrc/common/monsters/cl_monsters.qc | 1 - qcsrc/common/monsters/sv_monsters.qc | 13 ++++--------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/qcsrc/common/monsters/cl_monsters.qc b/qcsrc/common/monsters/cl_monsters.qc index 0171de2201..7b38e78d35 100644 --- a/qcsrc/common/monsters/cl_monsters.qc +++ b/qcsrc/common/monsters/cl_monsters.qc @@ -212,7 +212,6 @@ void monster_construct() self.draw = monster_draw; self.draw2d = monster_draw2d; self.maxdistance = autocvar_g_waypointsprite_monsters_maxdist; - self.teamradar_color = '1 0 0'; } void ent_monster() diff --git a/qcsrc/common/monsters/sv_monsters.qc b/qcsrc/common/monsters/sv_monsters.qc index d3572a076e..4336fc19be 100644 --- a/qcsrc/common/monsters/sv_monsters.qc +++ b/qcsrc/common/monsters/sv_monsters.qc @@ -373,15 +373,10 @@ void monster_checkattack(entity e, entity targ) void monster_use () { - if (self.enemy) - return; - if (self.health <= 0) - return; - - if(!monster_isvalidtarget(activator, self)) - return; - - self.enemy = activator; + if not(self.enemy) + if(self.health > 0) + if(monster_isvalidtarget(activator, self)) + self.enemy = activator; } .float last_trace; -- 2.39.2