vector vehicle_aimturret(entity _vehic, vector _target, entity _turrret, string _tagname,
float _pichlimit_min, float _pichlimit_max,
- float _rotlimit_min, float _rotlimit_max, float _aimspeed)
+ float _rotlimit_min, float _rotlimit_max, float _aimspeed, float dt)
{
vector vtmp, vtag;
float ftmp;
vtmp = vectoangles(normalize(_target - vtag));
vtmp = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(_vehic.angles), AnglesTransform_FromAngles(vtmp))) - _turrret.angles;
vtmp = AnglesTransform_Normalize(vtmp, true);
- ftmp = _aimspeed * frametime;
+ ftmp = _aimspeed * dt;
vtmp_y = bound(-ftmp, vtmp_y, ftmp);
vtmp_x = bound(-ftmp, vtmp_x, ftmp);
_turrret.angles_y = bound(_rotlimit_min, _turrret.angles_y + vtmp_y, _rotlimit_max);
float autocvar_g_vehicle_bumblebee_cannon_ammo_regen = 100;
float autocvar_g_vehicle_bumblebee_cannon_ammo_regen_pause = 1;
-float autocvar_g_vehicle_bumblebee_cannon_lock = 0;
+float autocvar_g_vehicle_bumblebee_cannon_lock = 1;
-float autocvar_g_vehicle_bumblebee_cannon_turnspeed = 160;
+float autocvar_g_vehicle_bumblebee_cannon_turnspeed = 260;
float autocvar_g_vehicle_bumblebee_cannon_pitchlimit_down = 60;
float autocvar_g_vehicle_bumblebee_cannon_pitchlimit_up = 60;
float autocvar_g_vehicle_bumblebee_cannon_turnlimit_in = 20;
if(autocvar_g_vehicle_bumblebee_cannon_lock)
{
- if(gun.lock_time < time)
+ if(gun.lock_time < time || IS_DEAD(gun.enemy) || STAT(FROZEN, gun.enemy))
gun.enemy = NULL;
if(trace_ent)
- if(trace_ent.move_movetype)
- if(trace_ent.takedamage)
- if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent))
- {
- if(DIFF_TEAM(trace_ent, this))
- {
- gun.enemy = trace_ent;
- gun.lock_time = time + 5;
- }
- }
+ if(trace_ent.move_movetype)
+ if(trace_ent.takedamage)
+ if(!IS_DEAD(trace_ent) && !STAT(FROZEN, trace_ent))
+ {
+ if(teamplay)
+ {
+ if(DIFF_TEAM(trace_ent, this))
+ {
+ gun.enemy = trace_ent;
+ gun.lock_time = time + 2.5;
+ }
+ }
+ else
+ {
+ gun.enemy = trace_ent;
+ gun.lock_time = time + 0.5;
+ }
+ }
}
if(gun.enemy)
UpdateAuxiliaryXhair(this, ad, '1 0 1', 1);
vehicle_aimturret(vehic, trace_endpos, gun, "fire",
autocvar_g_vehicle_bumblebee_cannon_pitchlimit_down * -1, autocvar_g_vehicle_bumblebee_cannon_pitchlimit_up,
- _out * -1, _in, autocvar_g_vehicle_bumblebee_cannon_turnspeed);
+ _out * -1, _in, autocvar_g_vehicle_bumblebee_cannon_turnspeed, dt);
}
else
vehicle_aimturret(vehic, _ct, gun, "fire",
autocvar_g_vehicle_bumblebee_cannon_pitchlimit_down * -1, autocvar_g_vehicle_bumblebee_cannon_pitchlimit_up,
- _out * -1, _in, autocvar_g_vehicle_bumblebee_cannon_turnspeed);
+ _out * -1, _in, autocvar_g_vehicle_bumblebee_cannon_turnspeed, dt);
if(!forbidWeaponUse(this))
if(PHYS_INPUT_BUTTON_ATCK(this))
vang = vehicle_aimturret(vehic, trace_endpos, vehic.gun3, "fire",
autocvar_g_vehicle_bumblebee_raygun_pitchlimit_down * -1, autocvar_g_vehicle_bumblebee_raygun_pitchlimit_up,
- autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides * -1, autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides, autocvar_g_vehicle_bumblebee_raygun_turnspeed);
+ autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides * -1, autocvar_g_vehicle_bumblebee_raygun_turnlimit_sides, autocvar_g_vehicle_bumblebee_raygun_turnspeed, dt);
if(!forbidWeaponUse(this))
if((PHYS_INPUT_BUTTON_ATCK(this) || PHYS_INPUT_BUTTON_ATCK2(this)) && (vehic.vehicle_energy > autocvar_g_vehicle_bumblebee_raygun_dps * PHYS_INPUT_FRAMETIME || autocvar_g_vehicle_bumblebee_raygun == 0))
vehicle_aimturret(vehic, trace_endpos, vehic.gun1, "fire1",
autocvar_g_vehicle_raptor_cannon_pitchlimit_down * -1, autocvar_g_vehicle_raptor_cannon_pitchlimit_up,
- autocvar_g_vehicle_raptor_cannon_turnlimit * -1, autocvar_g_vehicle_raptor_cannon_turnlimit, autocvar_g_vehicle_raptor_cannon_turnspeed);
+ autocvar_g_vehicle_raptor_cannon_turnlimit * -1, autocvar_g_vehicle_raptor_cannon_turnlimit, autocvar_g_vehicle_raptor_cannon_turnspeed, dt);
vehicle_aimturret(vehic, trace_endpos, vehic.gun2, "fire1",
autocvar_g_vehicle_raptor_cannon_pitchlimit_down * -1, autocvar_g_vehicle_raptor_cannon_pitchlimit_up,
- autocvar_g_vehicle_raptor_cannon_turnlimit * -1, autocvar_g_vehicle_raptor_cannon_turnlimit, autocvar_g_vehicle_raptor_cannon_turnspeed);
+ autocvar_g_vehicle_raptor_cannon_turnlimit * -1, autocvar_g_vehicle_raptor_cannon_turnlimit, autocvar_g_vehicle_raptor_cannon_turnspeed, dt);
/*
ad = ad * 0.5;