71 STAT(VEHICLESTAT_W2MODE,
this) =
STAT(VEHICLESTAT_W2MODE, vehic);
103 ad.y =
bound(-ftmp, ad.y, ftmp);
107 ad.x =
bound(-ftmp, ad.x, ftmp);
112 makevectors(vehic.angles +
'-2 0 0' * vehic.angles.x);
117 vehic.jump_delay =
time;
122 && vehic.frame == 4 && vehic.tur_head.wait != 0)
129 vehic.button2 =
false;
132 && !vehic.button2 && vehic.tur_head.wait <
time)
138 vehic.tur_head.wait =
time + 2;
139 vehic.jump_delay =
time + 2;
140 vehic.button2 =
true;
151 if (movefix.y == 0 && movefix.x == 0)
156 vehic.velocity = sd * 700 + rt * 600 +
v_up * 600;
159 else if (
time >= vehic.jump_delay)
165 if (vehic.sound_nexttime <
time || vehic.delay != 3)
168 vehic.sound_nexttime =
time + 6.486500;
184 ftmp =
bound(-ftmp, vehic.tur_head.angles.y, ftmp);
185 vehic.angles.y =
anglemods(vehic.angles.y + ftmp);
186 vehic.tur_head.angles.y -= ftmp;
192 CS(
this).movement.x = 1;
198 CS(
this).movement.x = -1;
202 CS(
this).movement.y = 0;
204 float oldvelz = vehic.velocity.z;
206 vehic.velocity.z = oldvelz;
208 if (vehic.velocity.z <= 20)
211 && (vehic.sound_nexttime <
time || vehic.delay != 1))
214 vehic.sound_nexttime =
time + 6.486500;
223 CS(
this).movement.y = -1;
229 CS(
this).movement.y = 1;
234 float oldvelz = vehic.velocity.z;
236 vehic.velocity.z = oldvelz;
238 if (vehic.velocity.z <= 20)
241 && (vehic.sound_nexttime <
time || vehic.delay != 2))
244 vehic.sound_nexttime =
time + 6.486500;
262 ++vehic.misc_bulletcounter;
264 entity gun = (vehic.misc_bulletcounter % 2) ? vehic.gun1 : vehic.gun2;
281 vehic.gun1.angles.z += 45;
282 vehic.gun2.angles.z -= 45;
283 if (vehic.gun1.angles.z >= 360)
285 vehic.gun1.angles.z = 0;
286 vehic.gun2.angles.z = 0;
308 if (vehic.gun2.cnt <=
time)
311 this.
vehicle_reload2 = 100 - ((vehic.gun2.cnt -
time) / vehic.attack_finished_single[0]) * 100;
313 setorigin(
this, vehic.origin +
'0 0 1' * vehic.maxs.z);
329 it.realowner = player;
350 setorigin(player, spot);
352 player.oldvelocity = player.velocity;
359 player.velocity.z += 200;
365 player.velocity = this.
velocity * 0.5;
366 player.velocity.z += 10;
370 player.oldvelocity = player.velocity;
371 setorigin(player, spot);
386 if (this.
alpha > 0.1)
408 entity h =
new(spiderbot_top);
409 entity g1 =
new(spiderbot_gun);
410 entity g2 =
new(spiderbot_gun);
411 entity b =
new(spiderbot_body);
413 setmodel(b, MDL_VEH_SPIDERBOT_BODY);
415 setmodel(g1, MDL_VEH_SPIDERBOT_GUN);
416 setmodel(g2, MDL_VEH_SPIDERBOT_GUN);
418 setorigin(b, this.
origin);
453 h.colormod = b.colormod = g1.colormod = g2.colormod =
'-2 -2 -2';
467 DEATH_VH_SPID_DEATH.m_id,
484 case IMP_weapon_group_1.impulse:
488 case IMP_weapon_group_2.impulse:
492 case IMP_weapon_group_3.impulse:
497 case IMP_weapon_next_byid.impulse:
498 case IMP_weapon_next_bypriority.impulse:
499 case IMP_weapon_next_bygroup.impulse:
507 case IMP_weapon_last.impulse:
508 case IMP_weapon_prev_byid.impulse:
509 case IMP_weapon_prev_bypriority.impulse:
510 case IMP_weapon_prev_bygroup.impulse:
552 if (instance.owner.flagcarried)
554 setattachment(instance.owner.flagcarried, instance.tur_head,
"");
555 setorigin(instance.owner.flagcarried,
'-20 0 120');
571 instance.nextthink =
time;
574 instance.tur_head.effects |=
EF_FLAME;
575 instance.colormod = instance.tur_head.colormod =
'-1 -1 -1';
586 instance.gun1 =
new(spiderbot_gun);
587 instance.gun2 =
new(spiderbot_gun);
588 setmodel(instance.gun1, MDL_VEH_SPIDERBOT_GUN);
589 setmodel(instance.gun2, MDL_VEH_SPIDERBOT_GUN);
590 setattachment(instance.gun1, instance.tur_head,
"tag_hardpoint01");
591 setattachment(instance.gun2, instance.tur_head,
"tag_hardpoint02");
592 instance.gravity = 2;
593 instance.mass = 5000;
597 instance.tur_head.frame = 1;
600 instance.alpha = instance.tur_head.alpha = instance.gun1.alpha = instance.gun2.alpha = 1;
601 instance.tur_head.angles =
'0 0 0';
604 setorigin(instance, instance.pos1 +
'0 0 128');
605 instance.angles = instance.pos2;
606 instance.damageforcescale = 0.03;
626 instance.max_health =
GetResource(instance, RES_HEALTH);
627 instance.pushable =
true;
637 Vehicles_drawHUD(VEH_SPIDERBOT.m_icon,
"vehicle_spider_weapon1",
"vehicle_spider_weapon2",
671 PAR(_(
"The %s vehicle walks and jumps around, and takes only one rider."),
COLORED_NAME(
this));
672 PAR(_(
"It can jump from very high altitudes while protecting the rider."));
673 PAR(_(
"It has two weapons the rider can control, which have different reticles for them similar to the %s. "
674 "The primary weapon is a machine gun, and is shot toward the green reticle. "
675 "The secondary weapon shoots rockets towards the white reticle. "
676 "The white reticle points to the front of the vehicle, while the green reticle also points to the front but with a bit of delay when the %s rotates."),
COLORED_NAME(VEH_RAPTOR),
COLORED_NAME(
this));
ERASEABLE float anglemods(float v)
float frame
primary framegroup animation (strength = 1 - lerpfrac - lerpfrac3 - lerpfrac4)
void antilag_clear(entity e, entity store)
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.
bool SetResourceExplicit(entity e, Resource res_type, float amount)
Sets the resource amount of an entity without calling any hooks.
void Vehicles_drawCrosshair(string crosshair)
void Vehicles_drawHUD(string vehicle, string vehicleWeapon1, string vehicleWeapon2, string iconAmmo1, vector colorAmmo1, string iconAmmo2, vector colorAmmo2)
vector autocvar_hud_progressbar_vehicles_ammo2_color
const string vCROSS_GUIDE
vector autocvar_hud_progressbar_vehicles_ammo1_color
const string vCROSS_BURST
entity AuxiliaryXhair[MAX_AXH]
#define COLORED_NAME(this)
#define setmodel(this, m)
#define PHYS_INPUT_BUTTON_CROUCH(s)
#define PHYS_INPUT_BUTTON_JUMP(s)
#define PHYS_INPUT_FRAMETIME
#define PHYS_INPUT_BUTTON_ATCK(s)
#define PHYS_INPUT_BUTTON_ZOOM(s)
#define PHYS_INPUT_BUTTON_ATCK2(s)
bool autocvar_sv_gameplayfix_gravityunaffectedbyticrate
const float SOLID_SLIDEBOX
float RadiusDamage(entity inflictor, entity attacker, float coredamage, float edgedamage, float rad, entity cantbe, entity mustbe, float forceintensity, int deathtype,.entity weaponentity, entity directhitentity)
void Send_Effect(entity eff, vector eff_loc, vector eff_vel, int eff_cnt)
#define IL_EACH(this, cond, body)
void movelib_groundalign4point(entity this, float spring_length, float spring_up, float blendrate, float _max)
Pitches and rolls the entity to match the gound.
void movelib_brake_simple(entity this, float force)
#define movelib_move_simple(e, newdir, velo, blendrate)
void set_movetype(entity this, int mt)
#define UNSET_ONGROUND(s)
const int MOVETYPE_BOUNCE
#define METHOD(cname, name, prototype)
float health
Legacy fields for the resources. To be removed.
IntrusiveList g_projectiles
const int CH_TRIGGER_SINGLE
#define sound(e, c, s, v, a)
float autocvar_g_vehicle_spiderbot_springblend
bool autocvar_g_vehicle_spiderbot
float autocvar_g_vehicle_spiderbot_shield_regen
float autocvar_g_vehicle_spiderbot_turnspeed_strafe
void spiderbot_headfade(entity this)
bool spiderbot_impulse(entity this, int _imp)
float autocvar_g_vehicle_spiderbot_health_regen
int autocvar_g_vehicle_spiderbot_shield
void spiderbot_exit(entity this, int eject)
float autocvar_g_vehicle_spiderbot_speed_stop
float autocvar_g_vehicle_spiderbot_turnspeed
vector autocvar_g_vehicle_spiderbot_bouncepain
float autocvar_g_vehicle_spiderbot_head_turnlimit
int autocvar_g_vehicle_spiderbot_health
void spiderbot_blowup(entity this)
float autocvar_g_vehicle_spiderbot_head_turnspeed
float autocvar_g_vehicle_spiderbot_health_regen_pause
float autocvar_g_vehicle_spiderbot_speed_walk
float autocvar_g_vehicle_spiderbot_movement_inertia
float autocvar_g_vehicle_spiderbot_respawntime
float autocvar_g_vehicle_spiderbot_shield_regen_pause
float autocvar_g_vehicle_spiderbot_head_pitchlimit_down
float autocvar_g_vehicle_spiderbot_springlength
float autocvar_g_vehicle_spiderbot_head_pitchlimit_up
bool spiderbot_frame(entity this, float dt)
float autocvar_g_vehicle_spiderbot_tiltlimit
float autocvar_g_vehicle_spiderbot_springup
float autocvar_g_vehicle_spiderbot_speed_strafe
void spiderbot_rocket_do(entity this)
float autocvar_g_vehicle_spiderbot_minigun_solidpenetration
float autocvar_g_vehicle_spiderbot_minigun_damage
float autocvar_g_vehicle_spiderbot_minigun_refire
int autocvar_g_vehicle_spiderbot_minigun_ammo_max
int autocvar_g_vehicle_spiderbot_minigun_ammo_regen
float autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause
int autocvar_g_vehicle_spiderbot_minigun_ammo_cost
float autocvar_g_vehicle_spiderbot_minigun_force
float autocvar_g_vehicle_spiderbot_minigun_spread
ClientState CS(Client this)
#define PAR(...)
Adds an individually translatable paragraph to PAGE_TEXT without having to deal with strcat and sprin...
void SUB_SetFade(entity ent, float vanish_time, float fading_time)
void CSQCModel_UnlinkEntity(entity e)
void vehicles_impact(entity this, float _minspeed, float _speedfac, float _maxpain)
bool vehicle_initialize(entity this, Vehicle info, bool nodrop)
void vehicles_regen(entity this, float timer,.float regen_field, float field_max, float rpause, float regen, float delta_time, float _healthscale)
vector vehicles_findgoodexit(entity this, entity player, vector prefer_spot)
void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, int axh_id)
void vehicles_think(entity this)
void vehicles_regen_resource(entity this, float timer,.float regen_field, float field_max, float rpause, float regen, float delta_time, float _healthscale, Resource resource)
void CSQCVehicleSetup(entity own, int vehicle_id)
void vehicles_frame(entity this, entity actor)
const float vehicle_shield
If ent is player this is 0..100 indicating precentage of shield left on vehicle. If ent is vehicle,...
const float vehicle_reload2
If ent is player this is 0..100 indicating percentage of secondary reload status. If ent is vehicle,...
const float vehicle_ammo1
If ent is player this is 0..100 indicating percentage of primary ammo left UNLESS value is already st...
const float vehicle_health
If ent is player this is 0..100 indicating precentage of health left on vehicle. Vehicle's value is t...
#define VEHICLE_UPDATE_PLAYER(ply, vehi, fld, vhname)
const float VOL_VEHICLEENGINE
#define VEHICLE_UPDATE_PLAYER_RESOURCE(ply, vehi, fld, vhname, res)
const float vehicle_ammo2
If ent is player this is 0..100 indicating percentage of secondary ammo left. If ent is vehicle,...
const float vehicle_reload1
If ent is player this is 0..100 indicating percentage of primary reload status. If ent is vehicle,...
void fireBullet(entity this,.entity weaponentity, vector start, vector dir, float spread, float max_solid_penetration, float damage, float headshot_multiplier, float force, float dtype, entity tracer_effect)
void crosshair_trace(entity pl)
#define vdist(v, cmp, f)
Vector distance comparison, avoids sqrt()
const int VHF_HASSHIELD
Vehicle has shileding.
const int VHF_HEALTHREGEN
Vehicles health regenerates.
const int VHF_SHIELDREGEN
Vehicles shield regenerates.
const int MAX_WEAPONSLOTS
entity weaponentities[MAX_WEAPONSLOTS]
bool weaponUseForbidden(entity player)
bool weaponLocked(entity player)