psize_z = 0;
drawpic(loc, SPIDER_CROSS2, psize, '0 1 1', 1, DRAWFLAG_ADDITIVE);
+ if(time - self.cnt > 0.1)
+ remove(self);
}
void Ent_AuxiliaryXhair(float isNew)
{
- entity ax;
+ //entity AuxiliaryXhair;
if(isNew)
{
+ if(AuxiliaryXhair)
+ remove(AuxiliaryXhair);
+
AuxiliaryXhair = spawn();
AuxiliaryXhair.draw2d = AuxiliaryXhair_Draw2D;
setmodel(AuxiliaryXhair, "null");
setsize(AuxiliaryXhair, '0 0 -1', '0 0 -1');
+
}
AuxiliaryXhair.origin_x = ReadCoord();
AuxiliaryXhair.origin_y = ReadCoord();
AuxiliaryXhair.origin_z = ReadCoord();
AuxiliaryXhair.drawmask = MASK_NORMAL;
+
+ AuxiliaryXhair.cnt = time;
//AuxiliaryXhair.solid = SOLID_NOT;
}
tracetoss(dropmark, self);
// Blend old with new predicted impact to smooth out jumpyness
- where = project_3d_to_2d(trace_endpos * 0.2 + where * 0.8);
+ where = project_3d_to_2d(trace_endpos * 0.5 + where * 0.5);
setorigin(dropmark, trace_endpos);
picsize = drawgetimagesize(raptor_d) * 0.2;
float autocvar_g_vehicle_raptor_guns_turnspeed;
float autocvar_g_vehicle_raptor_guns_turnlimit;
-float autocvar_g_vehicle_raptor_guns_pitchlimit;
+float autocvar_g_vehicle_raptor_guns_pitchlimit_up;
+float autocvar_g_vehicle_raptor_guns_pitchlimit_down;
float autocvar_g_vehicle_raptor_cannon_cost;
float autocvar_g_vehicle_raptor_cannon_damage;
if not (self.owner)
return;
+ Release_AuxiliaryXhair(self.owner);
makevectors(self.angles);
if(eject)
{
ftmp2 = autocvar_g_vehicle_raptor_guns_turnspeed * frametime;
ftmp = -ftmp2;
+ vector vf, ad;
// Gun1
- df = vectoangles(normalize(trace_endpos - gettaginfo(raptor.gun1, gettagindex(raptor.gun1, "fire1")))); // Find the direction & angle
+ df = gettaginfo(raptor.gun1, gettagindex(raptor.gun1, "fire1"));
+ ad += df;
+ vf += v_forward;
+ df = vectoangles(normalize(trace_endpos - df)); // Find the direction & angle
df = shortangle_vxy(df - (raptor.angles + raptor.gun1.angles), raptor.angles + raptor.gun1.angles); // Find aim offset
// Bind to aimspeed
df_x = bound(ftmp, df_x, ftmp2);
df_y = bound(ftmp, df_y, ftmp2);
// Bind to limts
- raptor.gun1.angles_x = bound(-(autocvar_g_vehicle_raptor_guns_pitchlimit + 8), df_x + raptor.gun1.angles_x, autocvar_g_vehicle_raptor_guns_pitchlimit);
+ raptor.gun1.angles_x = bound(-autocvar_g_vehicle_raptor_guns_pitchlimit_down, df_x + raptor.gun1.angles_x, autocvar_g_vehicle_raptor_guns_pitchlimit_up);
raptor.gun1.angles_y = bound(-autocvar_g_vehicle_raptor_guns_turnlimit, df_y + raptor.gun1.angles_y, autocvar_g_vehicle_raptor_guns_turnlimit);
//Gun 2
- df = vectoangles(normalize(trace_endpos - gettaginfo(raptor.gun2, gettagindex(raptor.gun2, "fire1")))); // Find the direction & angle
+ df = gettaginfo(raptor.gun2, gettagindex(raptor.gun2, "fire1"));
+ ad += df;
+ vf += v_forward;
+ df = vectoangles(normalize(trace_endpos - df)); // Find the direction & angle
df = shortangle_vxy(df - (raptor.angles + raptor.gun2.angles), raptor.angles + raptor.gun2.angles); // Find aim offset
// Bind to aimspeed
df_x = bound(ftmp, df_x, ftmp2);
df_y = bound(ftmp, df_y, ftmp2);
// Bind to limts
- raptor.gun2.angles_x = bound(-(autocvar_g_vehicle_raptor_guns_pitchlimit + 8), df_x + raptor.gun2.angles_x, autocvar_g_vehicle_raptor_guns_pitchlimit);
+ raptor.gun2.angles_x = bound(-autocvar_g_vehicle_raptor_guns_pitchlimit_down, df_x + raptor.gun2.angles_x, autocvar_g_vehicle_raptor_guns_pitchlimit_up);
raptor.gun2.angles_y = bound(-autocvar_g_vehicle_raptor_guns_turnlimit, df_y + raptor.gun2.angles_y, autocvar_g_vehicle_raptor_guns_turnlimit);
+ ad = ad * 0.5;
+ v_forward = vf * 0.5;
+ traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, raptor);
+ SpawnOrUpdateAuxiliaryXhair(player, trace_endpos);
+
+
if(player.BUTTON_ATCK)
if(raptor.attack_finished_single <= time)
if(raptor.vehicle_energy > autocvar_g_vehicle_raptor_cannon_cost)
traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, spider);
SpawnOrUpdateAuxiliaryXhair(player, trace_endpos);
- //player.angles_x = 0.01 * spider.angles_x + 0.99 * player.v_angle_x;
- //player.angles_y = 0.01 * spider.angles_y + 0.99 * player.v_angle_y;
- player.v_angle_y = spider.angles_y;
- //player.angles_x = player.v_angle_x;
- //player.angles_y = player.v_angle_y;
- //player.fixangle = TRUE;
-
self = player;
return 1;
}
void Release_AuxiliaryXhair(entity from)
{
+ // from.AuxiliaryXhair.drawonlytoclient = from.AuxiliaryXhair;
+ if not (from.AuxiliaryXhair == world || wasfreed(from.AuxiliaryXhair))
+ remove(from.AuxiliaryXhair);
- from.AuxiliaryXhair.drawonlytoclient = from.AuxiliaryXhair;
from.AuxiliaryXhair = world;
-
- //if not (from.AuxiliaryXhair == world || wasfreed(from.AuxiliaryXhair))
- remove(from.AuxiliaryXhair);
}
#define VEHICLE_UPDATE_PLAYER(fld,vhname) \
-set g_vehicle_racer_respawntime 60
+set g_vehicle_racer_respawntime 30
set g_vehicle_racer_health 300
set g_vehicle_racer_health_regen 0
set g_vehicle_racer_energy_regen_pause 1
set g_vehicle_racer_speed_stop 2000
-set g_vehicle_racer_speed_forward 1500
-set g_vehicle_racer_speed_strafe 1000
-set g_vehicle_racer_speed_afterburn 3500
-set g_vehicle_racer_afterburn_cost 50 // energy consumed per second
+set g_vehicle_racer_speed_forward 1000
+set g_vehicle_racer_speed_strafe 750
+set g_vehicle_racer_speed_afterburn 2000
+set g_vehicle_racer_afterburn_cost 75 // energy consumed per second
set g_vehicle_racer_hovertype 0 // 0 = hover, != 0 = maglev
set g_vehicle_racer_hoverpower 3600 // NOTE!! x 4 (4 engines)
-set g_vehicle_raptor_respawntime 60
+set g_vehicle_raptor_respawntime 30
// 0: go where player aims, +forward etc relative to aim angles
// 1: ignore aim for up/down movement. +forward always moved forward, +jump always moves up
set g_vehicle_raptor_guns_turnspeed 32
set g_vehicle_raptor_guns_turnlimit 10
-set g_vehicle_raptor_guns_pitchlimit 8
+set g_vehicle_raptor_guns_pitchlimit_up 8
+set g_vehicle_raptor_guns_pitchlimit_down 32
set g_vehicle_raptor_cannon_cost 1
set g_vehicle_raptor_cannon_damage 10
set g_vehicle_raptor_cannon_spread 0.05
set g_vehicle_raptor_energy 200
-set g_vehicle_raptor_energy_regen 50
+set g_vehicle_raptor_energy_regen 25
set g_vehicle_raptor_energy_regen_pause 1
set g_vehicle_raptor_health 250
set g_vehicle_raptor_health_regen 0
set g_vehicle_raptor_health_regen_pause 0
-set g_vehicle_raptor_shield 250
+set g_vehicle_raptor_shield 200
set g_vehicle_raptor_shield_regen 50
set g_vehicle_raptor_shield_regen_pause 1.5
-set g_vehicle_spiderbot_isloaded 1
-
set g_vehicle_spiderbot_respawntime 30
set g_vehicle_spiderbot_health 875
set g_vehicle_spiderbot_speed_strafe 300
set g_vehicle_spiderbot_movement_inertia 0.25
-set g_vehicle_spiderbot_minigun_damage 25
+set g_vehicle_spiderbot_minigun_damage 10
set g_vehicle_spiderbot_minigun_spread 0.015
set g_vehicle_spiderbot_minigun_speed 50000
set g_vehicle_spiderbot_minigun_refire 0.05
exec vehicle_raptor.cfg
exec vehicle_spiderbot.cfg
-
+set g_vehicle_racer_respawntime 10
+set g_vehicle_spiderbot_respawntime 10
+set g_vehicle_raptor_respawntime 10