// Render the Scene
if(!intermission || !view_set)
{
+ #ifdef VEHICLES_CSQC
if(hud)
{
view_origin = vehicle_hudmodel.origin; //pmove_org + vo + randomvec() * 20;
}
else
{
+ #endif
view_origin = pmove_org + vo;
view_angles = input_angles;
makevectors(view_angles);
view_right = v_right;
view_up = v_up;
view_set = 1;
- dprint("Bong!\n");
+ #ifdef VEHICLES_CSQC
}
+ #endif
}
#ifdef BLURTEST
self.movetype = MOVETYPE_BOUNCE;
self.owner.vehicle_health = (self.vehicle_health / autocvar_g_vehicle_racer_health);
self.owner.vehicle_shield = (self.vehicle_shield / autocvar_g_vehicle_racer_shield);
+#ifdef VEHICLES_CSQC
if(self.SendEntity)
self.SendFlags |= VSF_SETUP;
+#endif
}
void racer_exit(float eject)
self.velocity_z = 1; // Nudge upwards to takeoff sequense can work.
self.tur_head.exteriormodeltoclient = self.owner;
+ self.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
+ self.lip = time;
+
#ifdef RAPTOR_RETARDCAMERA
setorigin(self.vehicle_viewport, self.origin);
#endif
else
player.PlayerPhysplug = raptor_frame;
+ if(self.vehicle_flags & VHF_SHIELDREGEN)
+ vehicles_regen(dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime);
+
+ if(self.vehicle_flags & VHF_HEALTHREGEN)
+ vehicles_regen(dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime);
+
+ if(self.vehicle_flags & VHF_ENERGYREGEN)
+ vehicles_regen(cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime);
+
+
+ raptor.bomb1.alpha = raptor.bomb2.alpha = (time - raptor.lip) / (raptor.delay - raptor.lip);
+ player.vehicle_reload2 = bound(0, raptor.bomb1.alpha * 100, 100);
+
+ VEHICLE_UPDATE_PLAYER(health, raptor);
+ VEHICLE_UPDATE_PLAYER(energy, raptor);
+ if(self.vehicle_flags & VHF_HASSHIELD)
+ VEHICLE_UPDATE_PLAYER(shield, raptor);
+
player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
self = player;
return 1;
{
entity player, raptor;
float ftmp, ftmp2;
- vector df;
+ vector df, ra;
player = self;
raptor = self.vehicle;
df += v_up * autocvar_g_vehicle_raptor_speed_up;
raptor.velocity += df * frametime;
- player.velocity = player.movement = raptor.velocity;
- setorigin(player,raptor.origin + '0 0 32');
+ //player.velocity = player.movement = raptor.velocity;
+ player.velocity = raptor.velocity;
+ //setorigin(player,raptor.origin + '0 0 32');
vector vf, ad;
// Target lock & predict
}
}
+ ra = raptor.angles;
+ ra_z = 0;
// Aim the gunz
ftmp2 = autocvar_g_vehicle_raptor_cannon_turnspeed * frametime;
ftmp = -ftmp2;
//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
+ df = shortangle_vxy(df - (ra + raptor.gun1.angles), ra + raptor.gun1.angles); // Find aim offset
// Bind to aimspeed
df_x = bound(ftmp, df_x, ftmp2);
df_y = bound(ftmp, df_y, ftmp2);
//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
+ df = shortangle_vxy(df - (ra + raptor.gun2.angles), ra + raptor.gun2.angles); // Find aim offset
// Bind to aimspeed
df_x = bound(ftmp, df_x, ftmp2);
df_y = bound(ftmp, df_y, ftmp2);
if(self.vehicle_flags & VHF_HASSHIELD)
VEHICLE_UPDATE_PLAYER(shield, raptor);
-
-
player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
return 1;
}
// .viewmodelforclient works better.
//self.vehicle_hudmodel.drawonlytoclient = self.owner;
- if not (self.SendEntity)
+#ifndef VEHICLES_CSQC
self.vehicle_hudmodel.viewmodelforclient = self.owner;
+#endif
self.event_damage = vehicles_damage;
self.nextthink = 0;
self.team = self.owner.team;
self.flags -= FL_NOTARGET;
-#if 0
- other.clientcamera = self.vehicle_viewport;
-#else
- /*msg_entity = other;
+#ifndef VEHICLES_CSQC
+ msg_entity = other;
WriteByte (MSG_ONE, SVC_SETVIEWPORT);
WriteEntity(MSG_ONE, self.vehicle_viewport);
WriteAngle(MSG_ONE, self.angles_x * -1); // tilt
WriteAngle(MSG_ONE, self.angles_y); // yaw
WriteAngle(MSG_ONE, 0); // roll
- }*/
+ }
+#endif
#endif
vehicles_clearrturn();
-#define VEHICLES_CSQC
+//#define VEHICLES_CSQC
// #define VEHICLES_USE_ODE
#define VEHICLES_ENABLED
#ifdef VEHICLES_ENABLED
set g_vehicle_racer_respawntime 30
-set g_vehicle_racer_health 300
+set g_vehicle_racer_health 190
set g_vehicle_racer_health_regen 0
set g_vehicle_racer_health_regen_pause 0
-set g_vehicle_racer_shield 80
+set g_vehicle_racer_shield 75
set g_vehicle_racer_shield_regen 25
set g_vehicle_racer_shield_regen_pause 1
-set g_vehicle_racer_energy 150
-set g_vehicle_racer_energy_regen 50
-set g_vehicle_racer_energy_regen 50
+set g_vehicle_racer_energy 125
+set g_vehicle_racer_energy_regen 40
set g_vehicle_racer_energy_regen_pause 1
set g_vehicle_racer_speed_stop 2000
set g_vehicle_racer_cannon_force 50
set g_vehicle_racer_rocket_speed 1000
-set g_vehicle_racer_rocket_accel 1300
-set g_vehicle_racer_rocket_turnrate 0.14
-set g_vehicle_racer_rocket_damage 150
+set g_vehicle_racer_rocket_accel 1400
+set g_vehicle_racer_rocket_turnrate 0.15
+set g_vehicle_racer_rocket_damage 175
set g_vehicle_racer_rocket_force 350
-set g_vehicle_racer_rocket_radius 100
-set g_vehicle_racer_rocket_refire 5
+set g_vehicle_racer_rocket_radius 125
+set g_vehicle_racer_rocket_refire 6
set g_vehicle_racer_rocket_cost 0
set g_vehicle_racer_rocket_locktarget 1
set g_vehicle_racer_rocket_locking_time 0.45
-set g_vehicle_racer_rocket_locking_releasetime 1.2
-set g_vehicle_racer_rocket_locked_time 3.5
-set g_vehicle_racer_rocket_locked_maxangle 1.42
+set g_vehicle_racer_rocket_locking_releasetime 1.5
+set g_vehicle_racer_rocket_locked_time 5
+set g_vehicle_racer_rocket_locked_maxangle 1.44
set g_vehicle_racer_blowup_radius 250
set g_vehicle_racer_blowup_coredamage 250
set g_vehicle_raptor_cannon_pitchlimit_down 32
set g_vehicle_raptor_cannon_locktarget 1
-set g_vehicle_raptor_cannon_locking_time 0.6
+set g_vehicle_raptor_cannon_locking_time 0.5
set g_vehicle_raptor_cannon_locking_releasetime 1.5
-set g_vehicle_raptor_cannon_locked_time 3.5
+set g_vehicle_raptor_cannon_locked_time 5
set g_vehicle_raptor_cannon_predicttarget 1
set g_vehicle_raptor_cannon_cost 1
set g_vehicle_raptor_cannon_spread 0.01
set g_vehicle_raptor_cannon_force 50
-set g_vehicle_raptor_energy 20
-set g_vehicle_raptor_energy_regen 10
-set g_vehicle_raptor_energy_regen_pause 0.75
+set g_vehicle_raptor_energy 30
+set g_vehicle_raptor_energy_regen 15
+set g_vehicle_raptor_energy_regen_pause 0.8
-set g_vehicle_raptor_health 200
+set g_vehicle_raptor_health 150
set g_vehicle_raptor_health_regen 0
set g_vehicle_raptor_health_regen_pause 0
-set g_vehicle_raptor_shield 150
+set g_vehicle_raptor_shield 100
set g_vehicle_raptor_shield_regen 25
-set g_vehicle_raptor_shield_regen_pause 2
+set g_vehicle_raptor_shield_regen_pause 1.5
set g_vehicle_raptor_mass 2200
set g_vehicle_spiderbot_minigun_speed 50000
set g_vehicle_spiderbot_minigun_refire 0.05
set g_vehicle_spiderbot_minigun_ammo_cost 1
-set g_vehicle_spiderbot_minigun_ammo_max 100
-set g_vehicle_spiderbot_minigun_ammo_regen 10
+set g_vehicle_spiderbot_minigun_ammo_max 200
+set g_vehicle_spiderbot_minigun_ammo_regen 15
set g_vehicle_spiderbot_minigun_ammo_regen_pause 1
set g_vehicle_spiderbot_springlength 150