}
METHOD(Bumblebee, vr_death, void(Bumblebee thisveh, entity instance))
{
- SELFPARAM();
entity oldself = self;
+ setself(instance);
CSQCModel_UnlinkEntity(self);
self.nextthink = 0;
setorigin(self, self.pos1);
+
+ setself(oldself);
}
METHOD(Bumblebee, vr_spawn, void(Bumblebee thisveh, entity instance))
{
METHOD(Racer, vr_death, void(Racer thisveh, entity instance))
{
#ifdef SVQC
- self.SendEntity = func_null; // stop networking this racer (for now)
- self.health = 0;
- self.event_damage = func_null;
- self.solid = SOLID_CORPSE;
- self.takedamage = DAMAGE_NO;
- self.deadflag = DEAD_DYING;
- self.movetype = MOVETYPE_BOUNCE;
- self.wait = time;
- self.delay = 2 + time + random() * 3;
- self.cnt = 1 + random() * 2;
- self.touch = racer_deadtouch;
-
- Send_Effect(EFFECT_EXPLOSION_MEDIUM, self.origin, '0 0 0', 1);
+ instance.SendEntity = func_null; // stop networking this racer (for now)
+ instance.health = 0;
+ instance.event_damage = func_null;
+ instance.solid = SOLID_CORPSE;
+ instance.takedamage = DAMAGE_NO;
+ instance.deadflag = DEAD_DYING;
+ instance.movetype = MOVETYPE_BOUNCE;
+ instance.wait = time;
+ instance.delay = 2 + time + random() * 3;
+ instance.cnt = 1 + random() * 2;
+ instance.touch = racer_deadtouch;
+
+ Send_Effect(EFFECT_EXPLOSION_MEDIUM, instance.origin, '0 0 0', 1);
if(random() < 0.5)
- self.avelocity_z = 32;
+ instance.avelocity_z = 32;
else
- self.avelocity_z = -32;
+ instance.avelocity_z = -32;
- self.avelocity_x = -vlen(self.velocity) * 0.2;
- self.velocity += '0 0 700';
- self.colormod = '-0.5 -0.5 -0.5';
+ instance.avelocity_x = -vlen(instance.velocity) * 0.2;
+ instance.velocity += '0 0 700';
+ instance.colormod = '-0.5 -0.5 -0.5';
- self.think = racer_blowup_think;
- self.nextthink = time;
+ instance.think = racer_blowup_think;
+ instance.nextthink = time;
#endif
}
}
METHOD(Raptor, vr_death, void(Raptor thisveh, entity instance))
{
- self.health = 0;
- self.event_damage = func_null;
- self.solid = SOLID_CORPSE;
- self.takedamage = DAMAGE_NO;
- self.deadflag = DEAD_DYING;
- self.movetype = MOVETYPE_BOUNCE;
- self.think = raptor_diethink;
- self.nextthink = time;
- self.wait = time + 5 + (random() * 5);
+ instance.health = 0;
+ instance.event_damage = func_null;
+ instance.solid = SOLID_CORPSE;
+ instance.takedamage = DAMAGE_NO;
+ instance.deadflag = DEAD_DYING;
+ instance.movetype = MOVETYPE_BOUNCE;
+ instance.think = raptor_diethink;
+ instance.nextthink = time;
+ instance.wait = time + 5 + (random() * 5);
- Send_Effect(EFFECT_EXPLOSION_MEDIUM, findbetterlocation (self.origin, 16), '0 0 0', 1);
+ Send_Effect(EFFECT_EXPLOSION_MEDIUM, findbetterlocation (instance.origin, 16), '0 0 0', 1);
- self.velocity_z += 600;
+ instance.velocity_z += 600;
- self.avelocity = '0 0.5 1' * (random() * 400);
- self.avelocity -= '0 0.5 1' * (random() * 400);
+ instance.avelocity = '0 0.5 1' * (random() * 400);
+ instance.avelocity -= '0 0.5 1' * (random() * 400);
- self.colormod = '-0.5 -0.5 -0.5';
- self.touch = raptor_blowup;
+ instance.colormod = '-0.5 -0.5 -0.5';
+ instance.touch = raptor_blowup;
}
METHOD(Raptor, vr_spawn, void(Raptor thisveh, entity instance))
{
}
METHOD(Spiderbot, vr_death, void(Spiderbot thisveh, entity instance))
{
- self.health = 0;
- self.event_damage = func_null;
- self.takedamage = DAMAGE_NO;
- self.touch = func_null;
- 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;
- self.colormod = self.tur_head.colormod = '-1 -1 -1';
- self.frame = 10;
- self.movetype = MOVETYPE_TOSS;
-
- CSQCModel_UnlinkEntity(self); // networking the death scene would be a nightmare
+ instance.health = 0;
+ instance.event_damage = func_null;
+ instance.takedamage = DAMAGE_NO;
+ instance.touch = func_null;
+ instance.cnt = 3.4 + time + random() * 2;
+ instance.think = spiderbot_blowup;
+ instance.nextthink = time;
+ instance.deadflag = DEAD_DYING;
+ instance.frame = 5;
+ instance.tur_head.effects |= EF_FLAME;
+ instance.colormod = instance.tur_head.colormod = '-1 -1 -1';
+ instance.frame = 10;
+ instance.movetype = MOVETYPE_TOSS;
+
+ CSQCModel_UnlinkEntity(instance); // networking the death scene would be a nightmare
}
METHOD(Spiderbot, vr_spawn, void(Spiderbot thisveh, entity instance))
{