#include "../../server/defs.qh"
#include "../deathtypes.qh"
#include "../../server/mutators/mutators_include.qh"
- #include "../../server/tturrets/include/turrets_early.qh"
- #include "../../server/vehicles/vehicle.qh"
+ #include "../../server/steerlib.qh"
+ #include "../turrets/sv_turrets.qh"
+ #include "../turrets/util.qh"
+ #include "../vehicles/all.qh"
#include "../../server/campaign.qh"
#include "../../server/command/common.qh"
#include "../../server/command/cmd.qh"
#include "../triggers/triggers.qh"
#include "../../csqcmodellib/sv_model.qh"
#include "../../server/round_handler.qh"
- #include "../../server/tturrets/include/turrets.qh"
#endif
// =========================
//if(trace_ent != targ)
//return false;
- if(targ.vehicle_flags & VHF_ISVEHICLE)
+ if(IS_VEHICLE(targ))
if(!((get_monsterinfo(ent.monsterid)).spawnflags & MON_FLAG_RANGED))
return false; // melee attacks are useless against vehicles
if(IS_SPEC(targ) || IS_OBSERVER(targ))
return false; // enemy is a spectator
- if(!(targ.vehicle_flags & VHF_ISVEHICLE))
+ if(!IS_VEHICLE(targ))
if(targ.deadflag != DEAD_NO || ent.deadflag != DEAD_NO || targ.health <= 0 || ent.health <= 0)
return false; // enemy/self is dead
if(targ.monster_owner == ent)
return false; // don't attack our pet
- if(!(targ.vehicle_flags & VHF_ISVEHICLE))
+ if(!IS_VEHICLE(targ))
if(targ.flags & FL_NOTARGET)
return false; // enemy can't be targeted
return;
if(self.enemy != other)
- if(!(other.flags & FL_MONSTER))
+ if(!IS_MONSTER(other))
if(monster_isvalidtarget(other, self))
self.enemy = other;
}
self.health += autocvar_g_monsters_miniboss_healthboost;
self.effects |= EF_RED;
if(!self.weapon)
- self.weapon = WEP_VORTEX;
+ self.weapon = WEP_VORTEX.m_id;
}
}
{
float current_distance = vlen((('1 0 0' * to.x) + ('0 1 0' * to.y)) - (('1 0 0' * from.x) + ('0 1 0' * from.y))); // for the sake of this check, exclude Z axis
float initial_height = 0; //min(50, (targ_distance * tanh(20)));
- float current_height = (initial_height * min(1, (current_distance / self.pass_distance)));
+ float current_height = (initial_height * min(1, self.pass_distance ? (current_distance / self.pass_distance) : 0));
//print("current_height = ", ftos(current_height), ", initial_height = ", ftos(initial_height), ".\n");
vector targpos;
if(!mon)
return; // nothing to remove
- pointparticles(particleeffectnum("item_pickup"), mon.origin, '0 0 0', 1);
+ Send_Effect("item_pickup", mon.origin, '0 0 0', 1);
if(mon.weaponentity)
remove(mon.weaponentity);