49 bool donetrace =
false;
66 float grav, sdist, zdist, vs, vz, jumpheight;
70 zdist = tgt_z - org_z;
71 sdist =
vlen(tgt -
org - zdist *
'0 0 1');
75 jumpheight =
fabs(ht);
77 jumpheight = jumpheight + zdist;
80 vz =
sqrt(2 * grav * jumpheight);
91 solution_y = solution_x;
93 solution_x = solution_y;
134 return sdir * vs +
'0 0 1' * vz;
142 if (this.
wait != -10)
147 if (this.
tur_head.frame == 9 ||
this.tur_head.frame == 1)
149 if(this.
gun2.cnt <
time &&
this.tur_head.frame == 9)
183 switch(
STAT(VEHICLESTAT_W2MODE,
this))
186 rocket =
vehicles_projectile(
this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_VEH_SPIDERBOT_ROCKET_FIRE,
200 rocket =
vehicles_projectile(
this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_VEH_SPIDERBOT_ROCKET_FIRE,
206 rocket.nextthink =
time;
212 rocket =
vehicles_projectile(
this, EFFECT_SPIDERBOT_ROCKETLAUNCH, SND_VEH_SPIDERBOT_ROCKET_FIRE,
220 rocket.pos1_z = trace_endpos_z;
227 float h2 = 0.75 *
vlen(rocket.pos1 - v);
235 rocket.classname =
"spiderbot_rocket";
var entity(vector mins, vector maxs,.entity tofield) findbox_tofield_OrFallback
#define PHYS_INPUT_BUTTON_ATCK2(s)
#define autocvar_sv_gravity
void UpdateCSQCProjectile(entity e)
#define IL_EACH(this, cond, body)
ERASEABLE vector solve_quadratic(float a, float b, float c)
ax^2 + bx + c = 0
void set_movetype(entity this, int mt)
const int PROJECTILE_SPIDERROCKET
IntrusiveList g_projectiles
vector spiberbot_calcartillery(vector org, vector tgt, float ht)
void spiderbot_rocket_artillery(entity this)
float spiberbot_calcartillery_flighttime
void spiderbot_rocket_guided(entity this)
void spiderbot_rocket_unguided(entity this)
void spiderbot_rocket_do(entity this)
void spiderbot_guide_release(entity this)
float autocvar_g_vehicle_spiderbot_rocket_speed
float autocvar_g_vehicle_spiderbot_rocket_lifetime
float autocvar_g_vehicle_spiderbot_rocket_turnrate
float autocvar_g_vehicle_spiderbot_rocket_force
float autocvar_g_vehicle_spiderbot_rocket_noise
float autocvar_g_vehicle_spiderbot_rocket_damage
float autocvar_g_vehicle_spiderbot_rocket_radius
float autocvar_g_vehicle_spiderbot_rocket_health
float autocvar_g_vehicle_spiderbot_rocket_spread
float autocvar_g_vehicle_spiderbot_rocket_refire2
float autocvar_g_vehicle_spiderbot_rocket_reload
float autocvar_g_vehicle_spiderbot_rocket_refire
entity vehicles_projectile(entity this, entity _mzlfx, Sound _mzlsound, vector _org, vector _vel, float _dmg, float _radi, float _force, float _size, int _deahtype, float _projtype, float _health, bool _cull, bool _clianim, entity _owner)
void vehicles_projectile_explode_think(entity this)
void crosshair_trace(entity pl)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
bool weaponUseForbidden(entity player)
bool weaponLocked(entity player)
float attack_finished_single[MAX_WEAPONSLOTS]