22#ifdef EWHEEL_FANCYPATH
69 if ( this.
tur_head.spawnshieldtime < 1 )
74 else if (this.
tur_head.spawnshieldtime < 2)
117 LOG_TRACE(
"Initital waypoint for ewheel does NOT exist, fix your map!");
121 if (e.classname !=
"turret_checkpoint")
126#ifdef EWHEEL_FANCYPATH
139 vector wish_angle, real_angle;
141 float vz = it.velocity_z;
150 real_angle = wish_angle - it.angles;
153 it.tur_head.spawnshieldtime =
fabs(real_angle_y);
155 float f = it.tur_head.aim_speed *
frametime;
156 real_angle_y =
bound(-f, real_angle_y, f);
157 it.angles_y = (it.angles_y + real_angle_y);
161 else if(it.pathcurrent)
174 it.velocity =
'0 0 0';
176#ifdef EWHEEL_FANCYPATH
180 it.pathcurrent =
NULL;
187 it.velocity =
'0 0 0';
190 setorigin(it, it.pos1);
196 it.iscreature =
true;
198 if(!it.damagedbycontents)
200 it.damagedbycontents =
true;
204 it.idle_aim =
'0 0 0';
208 it.frame = it.tur_head.frame = 1;
222 this.move_time =
time;
251 PAR(_(
"The %s is a mobile turret that rolls around, attacking its targets when they enter its line of sight."),
COLORED_NAME(
this));
252 PAR(_(
"It attacks by shooting laser beams similar to those of the %s, from both of its two cannons."),
COLORED_NAME(WEP_BLASTER));
ERASEABLE float anglemods(float v)
ERASEABLE vector shortangle_vxy(vector ang1, vector ang2)
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
float GetResource(entity e, Resource res_type)
Returns the current amount of resource the given entity has.
#define COLORED_NAME(this)
const int INITPRIO_FINDTARGET
const float SOLID_SLIDEBOX
IntrusiveList g_damagedbycontents
const int ewheel_anim_stop
void ewheel_findtarget(entity this)
float autocvar_g_turrets_unit_ewheel_speed_slow
void ewheel_move_path(entity this)
float autocvar_g_turrets_unit_ewheel_turnrate
float autocvar_g_turrets_unit_ewheel_speed_stop
float autocvar_g_turrets_unit_ewheel_speed_slower
float autocvar_g_turrets_unit_ewheel_speed_fast
const int ewheel_anim_bck_fast
void ewheel_move_enemy(entity this)
const int ewheel_anim_fwd_slow
void ewheel_move_idle(entity this)
void ewheel_draw(entity this)
const int ewheel_anim_fwd_fast
const int ewheel_anim_bck_slow
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
void movelib_brake_simple(entity this, float force)
#define movelib_move_simple(e, newdir, velo, blendrate)
void set_movetype(entity this, int mt)
const int MOVETYPE_BOUNCE
#define METHOD(cname, name, prototype)
void pathlib_deletepath(entity start)
entity pathlib_astar(entity this, vector from, vector to)
vector steerlib_arrive(entity this, vector point, float maximal_distance)
Pull toward a point, The further away, the stronger the pull.
vector steerlib_attract2(entity this, vector point, float min_influense, float max_distance, float max_influense)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
bool turret_closetotarget(entity this, vector targ, float range)
bool turret_initialize(entity this, Turret tur)
void turrets_setframe(entity this, float _frame, float client_only)
const int TELEPORT_NORMAL
const int TFL_TARGETSELECT_TEAMCHECK
const int TFL_TARGETSELECT_PLAYERS
const int TFL_TARGETSELECT_RANGELIMITS
const int TFL_AMMO_ENERGY
const int TFL_TARGETSELECT_LOS
const int TFL_AMMO_RECHARGE
const int TFL_AMMO_RECIEVE
void InitializeEntity(entity e, void(entity this) func, int order)