void racer_blowup()
{
sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
- pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+ pointparticles(particleeffectnum("explosion_big"), self.origin, '0 0 0', 1);
self.deadflag = DEAD_DEAD;
self.vehicle_exit(VHEF_NORMAL);
void racer_deadtouch()
{
+ dprint("Boink!\n");
self.avelocity_x *= 0.7;
self.cnt -= 1;
if(self.cnt <= 0)
self.deadflag = DEAD_DYING;
self.movetype = MOVETYPE_BOUNCE;
self.wait = time;
- self.cnt = 1 + random() * 3;
+ self.cnt = 1 + random() * 2;
self.touch = racer_deadtouch;
-
- pointparticles(particleeffectnum("rocket_explode"), findbetterlocation (self.origin, 16), '0 0 0', 1);
+
+ pointparticles(particleeffectnum("explosion_medium"), self.origin, '0 0 0', 1);
if(random() < 0.5)
- self.avelocity_z = 16;
+ self.avelocity_z = 32;
else
- self.avelocity_z = -16;
+ self.avelocity_z = -32;
self.avelocity_x = -vlen(self.velocity) * 0.2;
self.velocity += '0 0 700';
#if VEHICLES_VIEWROTATE_CROSSHAIR
df = vectoangles(normalize(trace_endpos - self.origin + '0 0 32'));
if(df_x > 180) df_x -= 360;
- if(df_x < -180) df_x += 360;--
+ if(df_x < -180) df_x += 360;
if(df_y > 180) df_y -= 360;
if(df_y < -180) df_y += 360;
void raptor_blowup()
{
sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
- pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
+ pointparticles(particleeffectnum("explosion_big"), self.origin, '0 0 0', 1);
self.deadflag = DEAD_DEAD;
self.vehicle_exit(VHEF_NORMAL);
setorigin(self, self.pos1);
self.touch = SUB_Null;
+ self.nextthink = 0;
+}
+
+void raptor_diethink()
+{
+ //self.avelocity += '0 0.5 1' * (random() * 5);
+ //self.avelocity -= '0 0.5 1' * (random() * 5);
+
+ if(random() < 0.1)
+ {
+ sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+ }
+ self.nextthink = time + 0.1;
}
void raptor_die()
self.takedamage = DAMAGE_NO;
self.deadflag = DEAD_DYING;
self.movetype = MOVETYPE_BOUNCE;
+ self.think = raptor_diethink;
+ self.nextthink = time;
+
+ pointparticles(particleeffectnum("explosion_medium"), findbetterlocation (self.origin, 16), '0 0 0', 1);
- pointparticles(particleeffectnum("rocket_explode"), findbetterlocation (self.origin, 16), '0 0 0', 1);
-
- self.velocity_z += 128;
+ self.velocity_z += 600;
- if(random() < 0.5)
- self.avelocity_z = 45 + random() * 270;
- else
- self.avelocity_z = -45 + random() * -270;
+ self.avelocity = '0 0.5 1' * (random() * 400);
+ self.avelocity -= '0 0.5 1' * (random() * 400);
self.colormod = '-0.5 -0.5 -0.5';
self.touch = raptor_blowup;
if(self.alpha > 0.1)
{
sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
- pointparticles(particleeffectnum("rocket_explode"), self.origin + '0 0 100', '0 0 0', 1);
+ pointparticles(particleeffectnum("explosion_big"), self.origin + '0 0 100', '0 0 0', 1);
}
remove(self);
}
void spiderbot_blowup()
{
- float i;
- sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
-
- for(i = 0; i < 5; ++i)
- pointparticles(particleeffectnum("rocket_explode"), self.origin + (randomvec() * 100) + '0 0 100', '0 0 0', 1);
-
+ if(self.cnt > time)
+ {
+ if(random() < 0.1)
+ {
+ sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
+ pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+ }
+ self.nextthink = time + 0.1;
+ return;
+ }
+
entity h, g1, g2, b;
b = spawn();
h = spawn();
self.solid = SOLID_NOT;
self.tur_head.effects &~= EF_FLAME;
self.vehicle_hudmodel.viewmodelforclient = self;
-
- //self.nextthink = time + autocvar_g_vehicle_spiderbot_respawntime;
- //self.think = spiderbot_spawn;
-
- //setorigin(self, self.tur_aimpos);
}
void spiderbot_die()
{
sound (self, CHAN_VOICE, "vehicles/spiderbot_die.wav", VOL_BASE, ATTN_NORM);
//sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
- pointparticles(particleeffectnum("rocket_explode"), self.origin + '0 0 100', '0 0 0', 1);
+ pointparticles(particleeffectnum("explosion_medium"), self.origin + '0 0 100', '0 0 0', 1);
self.health = 0;
self.event_damage = SUB_Null;
self.takedamage = DAMAGE_NO;
self.touch = SUB_Null;
- self.nextthink = 3.4 + time + random() * 2;
+ self.cnt = 3.4 + time + random() * 2;
self.think = spiderbot_blowup;
+ self.nextthink = time;
self.deadflag = DEAD_DYING;
self.frame = 5;
self.tur_head.effects |= EF_FLAME;
float autocvar_g_vehicles_crush_dmg;
float autocvar_g_vehicles_crush_force;
+float autocvar_g_vehicles_delayspawn;
void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force);
void vehicles_return();
}
void vehicles_exit(float eject)
-{
+{
self.flags |= FL_NOTARGET;
if (self.owner)
self.event_damage = vehicles_damage;
self.touch = vehicles_touch;
self.think = vehicles_spawn;
- self.nextthink = time;
+
+ if(autocvar_g_vehicles_delayspawn)
+ self.nextthink = time + _respawntime;
+ else
+ self.nextthink = time;
+
self.vehicle_respawntime = _respawntime;
self.vehicle_spawn = spawnproc;
set g_vehicles_crush_force 50
set cl_vehicles_hudscale 0.5
+
+set g_vehicles_delayspawn 0