if(self.realowner == world)
return TRUE;
+ if(self.turrcaps_flags & TFL_TURRCAPS_SUPPORT)
+ self.target_range = 500;
+
self.bot_attack = FALSE;
buffturret(self, 0.7);
if(turret_target.flags & FL_PROJECTILE)
if(turret_target.owner.flags & FL_MONSTER)
return TRUE; // flac support
-
- if(turret.turrcaps_flags & TFL_TURRCAPS_SUPPORT && turret_target.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
- return TRUE;
+
if not(turret_target.flags & FL_MONSTER)
turret_target = world;
vector fl_org;
self.enemy.ammo = min(self.enemy.ammo + self.shot_dmg,self.enemy.ammo_max);
- if(g_td) // auto repair?
+ if(g_td) // auto heal monsters in tower defense
{
self.enemy.health = min(self.enemy.health + self.shot_dmg,self.enemy.max_health);
- self.enemy.tur_health = min(self.enemy.tur_health + self.shot_dmg,self.enemy.max_health);
- self.enemy.SendFlags |= TNSF_STATUS;
+ self.enemy.SendFlags |= MSF_STATUS;
}
fl_org = 0.5 * (self.enemy.absmin + self.enemy.absmax);
te_smallflash(fl_org);
if(g_td)
{
- if(self.realowner != self.enemy.realowner)
+ if(self.enemy.health >= self.enemy.max_health)
return 0;
-
- if(self.enemy.turrcaps_flags & TFL_TURRCAPS_AMMOSOURCE)
+
+ if(IsDifferentTeam(self.enemy, self))
return 0;
- if(self.enemy.health >= self.enemy.max_health)
- return 0;
+ if(self.enemy.flags & FL_MONSTER)
+ return 1; // the following checks are for turrets only
}
if (self.enemy.ammo >= self.enemy.ammo_max)