if(time > racer.delay)
if(player.BUTTON_ATCK2)
{
- racer_fire_rocket("tag_rocket_r", (self.lock_strength == 1 && self.lock_target) ? self.lock_target : world);
- racer_fire_rocket("tag_rocket_l", (self.lock_strength == 1 && self.lock_target) ? self.lock_target : world);
+ self.misc_bulletcounter += 1;
+ racer.delay = time + 0.2;
+ if(self.misc_bulletcounter == 1)
+ racer_fire_rocket("tag_rocket_r", (self.lock_strength == 1 && self.lock_target) ? self.lock_target : world);
+ else if(self.misc_bulletcounter == 2)
+ racer_fire_rocket("tag_rocket_l", (self.lock_strength == 1 && self.lock_target) ? self.lock_target : world);
+ else
+ {
+ self.lock_strength = 0;
+ self.lock_target = world;
+ self.misc_bulletcounter = 0;
- self.lock_strength = 0;
- self.lock_target = world;
+ racer.delay = time + autocvar_g_vehicle_racer_rocket_refire;
+ racer.lip = time;
- racer.delay = time + autocvar_g_vehicle_racer_rocket_refire;
- racer.lip = time;
+ }
}
player.fire2_waspressed = player.BUTTON_ATCK2;
self.owner = world;
}
-void racer_touch()
+/*void racer_touch()
{
- vehicles_touch();
+ //vehicles_touch();
if(self.owner)
{
return;
return;
vehicles_enter();
-}
+}*/
void racer_spawn()
{
self.vehicle_shield = autocvar_g_vehicle_racer_shield;
self.event_damage = vehicles_damage;
- self.touch = racer_touch;
+ //self.touch = racer_touch;
+ self.touch = vehicles_touch;
self.iscreature = TRUE;
self.scale = 0.5;
if(raptor.vehicle_energy > autocvar_g_vehicle_raptor_cannon_cost)
{
raptor.misc_bulletcounter += 1;
- if(mod(raptor.misc_bulletcounter, 2))
+ raptor.attack_finished_single = time + autocvar_g_vehicle_raptor_cannon_refire;
+ //if(mod(raptor.misc_bulletcounter, 2))
+ if(raptor.misc_bulletcounter <= 2)
raptor_fire_cannon(self.gun1, "fire1");
+ else if(raptor.misc_bulletcounter == 3)
+ raptor_fire_cannon(self.gun2, "fire1");
else
+ {
+ raptor.attack_finished_single = time + autocvar_g_vehicle_raptor_cannon_refire * 2;
raptor_fire_cannon(self.gun2, "fire1");
+ raptor.misc_bulletcounter = 0;
+ }
+
raptor.vehicle_energy -= autocvar_g_vehicle_raptor_cannon_cost;
- raptor.attack_finished_single = time + autocvar_g_vehicle_raptor_cannon_refire;
+
self.cnt = time;
}
return 1;
}
-void raptor_touch()
+/*void raptor_touch()
{
- vehicles_touch();
+ //vehicles_touch();
if(self.owner)
{
if(vlen(self.velocity) == 0)
return;
vehicles_enter();
-}
+}*/
void raptor_blowup()
{
self.vehicle_health = autocvar_g_vehicle_raptor_health;
self.vehicle_shield = autocvar_g_vehicle_raptor_shield;
self.event_damage = vehicles_damage;
- self.touch = raptor_touch;
+ //self.touch = raptor_touch;
+ self.touch = vehicles_touch;
self.iscreature = TRUE;
self.movetype = MOVETYPE_FLY;
self.solid = SOLID_BBOX;
return 0;
}
-void spiderbot_touch()
+/*void spiderbot_touch(
{
- vehicles_touch();
+ //vehicles_touch();
if(self.owner)
{
if(vlen(self.velocity) == 0)
return;
vehicles_enter();
-}
+}*/
void spiderbot_spawn()
self.movetype = MOVETYPE_WALK;
self.solid = SOLID_SLIDEBOX;
self.takedamage = DAMAGE_AIM;
- self.touch = spiderbot_touch;
+ //self.touch = spiderbot_touch;
+ self.touch = vehicles_touch;
self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = 1;
self.tur_head.angles = '0 0 0';
self.deadflag = DEAD_NO;
+float autocvar_g_vehicles_crush_dmg;
+float autocvar_g_vehicles_crush_force;
+
void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
void vehicles_return();
void vehicles_clearrturn();
return v_forward * force_fromtag_power;
}
+// Better way of determening whats crushable needed! (fl_crushable?)
+float vehicles_crushable(entity e)
+{
+ if(e.classname == "corpse")
+ return TRUE;
+
+ if(e.classname == "player")
+ return TRUE;
+
+ if(e.classname == "monster_zombie")
+ return TRUE;
+
+ return FALSE;
+}
+
void vehicles_enter();
void vehicles_touch()
{
{
//other.velocity += self.velocity * (self.mass / other.mass);
}
+ else if(vehicles_crushable(other))
+ {
+ if(vlen(self.velocity) != 0)
+ Damage(other, self, self.owner, autocvar_g_vehicles_crush_dmg, DEATH_SBCRUSH, '0 0 0', normalize(other.origin - self.origin) * autocvar_g_vehicles_crush_force);
+ }
}
+
+ return;
}
if(other.classname != "player")
else
self.vehicle_health -= damage;
+ self.velocity += force * (vlen(force) / self.mass);
+
if(self.vehicle_health <= 0)
{
if(self.owner)
self.vehicle_die = self.vehicle_exit;
self.vehicle_spawn = self.vehicle_exit;
self.AuxiliaryXhair = self.AuxiliaryXhair;
- //self.vehicle_message = self.vehicle_exit;
}
set g_vehicle_racer_downforce 0.01
set g_vehicle_racer_springlength 40
-set g_vehicle_racer_collision_multiplier 0.55
+set g_vehicle_racer_collision_multiplier 0.05
set g_vehicle_racer_anglestabilizer 2
set g_vehicle_racer_turnspeed 200
set g_vehicle_racer_laser_refire 0.1
set g_vehicle_racer_laser_cost 2
-set g_vehicle_racer_rocket_speed 1250
-set g_vehicle_racer_rocket_accel 1000
-set g_vehicle_racer_rocket_turnrate 0.12
-set g_vehicle_racer_rocket_damage 120
+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_radius 100
-set g_vehicle_racer_rocket_refire 3
+set g_vehicle_racer_rocket_refire 5
set g_vehicle_racer_rocket_cost 0
-set g_vehicle_racer_rocket_locktarget 1
-set g_vehicle_racer_rocket_locking_time 0.5
-set g_vehicle_racer_rocket_locking_releasetime 1
-set g_vehicle_racer_rocket_locked_time 2
-set g_vehicle_racer_rocket_locked_maxangle 1.4
-set g_vehicle_racer_blowup_radius 250
-set g_vehicle_racer_blowup_coredamage 250
-set g_vehicle_racer_blowup_edgedamage 15
-set g_vehicle_racer_blowup_forceintensity 250
-
-set g_vehicle_racer_mass 900
+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_blowup_radius 250
+set g_vehicle_racer_blowup_coredamage 250
+set g_vehicle_racer_blowup_edgedamage 15
+set g_vehicle_racer_blowup_forceintensity 250
+
+set g_vehicle_racer_mass 900
set g_vehicle_raptor_speed_down 900
set g_vehicle_raptor_friction 0.7
-set g_vehicle_raptor_bomblets 12
+set g_vehicle_raptor_bomblets 10
set g_vehicle_raptor_bomblet_alt 750
set g_vehicle_raptor_bomblet_time 0.5
-set g_vehicle_raptor_bomblet_spread 0.4
-set g_vehicle_raptor_bomblet_damage 35
-set g_vehicle_raptor_bomblet_edgedamage 15
-set g_vehicle_raptor_bomblet_radius 300
+set g_vehicle_raptor_bomblet_spread 0.45
+set g_vehicle_raptor_bomblet_damage 40
+set g_vehicle_raptor_bomblet_edgedamage 20
+set g_vehicle_raptor_bomblet_radius 310
set g_vehicle_raptor_bomblet_force 150
-set g_vehicle_raptor_bomblet_explode_delay 0.25
+set g_vehicle_raptor_bomblet_explode_delay 0.35
set g_vehicle_raptor_bombs_refire 5
set g_vehicle_raptor_cannon_turnspeed 90
set g_vehicle_raptor_cannon_pitchlimit_up 12
set g_vehicle_raptor_cannon_pitchlimit_down 32
-set g_vehicle_raptor_cannon_locktarget 1
-set g_vehicle_raptor_cannon_locking_time 0.5
-set g_vehicle_raptor_cannon_locking_releasetime 1
-set g_vehicle_raptor_cannon_locked_time 2
-set g_vehicle_raptor_cannon_predicttarget 1
+set g_vehicle_raptor_cannon_locktarget 1
+set g_vehicle_raptor_cannon_locking_time 0.6
+set g_vehicle_raptor_cannon_locking_releasetime 1.5
+set g_vehicle_raptor_cannon_locked_time 3.5
+set g_vehicle_raptor_cannon_predicttarget 1
set g_vehicle_raptor_cannon_cost 1
set g_vehicle_raptor_cannon_damage 25
-set g_vehicle_raptor_cannon_radius 50
-set g_vehicle_raptor_cannon_refire 0.075
-set g_vehicle_raptor_cannon_speed 12500
-set g_vehicle_raptor_cannon_spread 0.0125
+set g_vehicle_raptor_cannon_radius 60
+set g_vehicle_raptor_cannon_refire 0.1
+set g_vehicle_raptor_cannon_speed 12000
+set g_vehicle_raptor_cannon_spread 0.01
-set g_vehicle_raptor_energy 30
-set g_vehicle_raptor_energy_regen 15
+set g_vehicle_raptor_energy 40
+set g_vehicle_raptor_energy_regen 20
set g_vehicle_raptor_energy_regen_pause 0.75
set g_vehicle_raptor_health 200
set g_vehicle_racer_respawntime 10
set g_vehicle_spiderbot_respawntime 10
set g_vehicle_raptor_respawntime 10
+
+set g_vehicles_crush_dmg 70
+set g_vehicles_crush_force 50