} else if(type == DEATH_SBBLOWUP) {
HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print (sprintf(_("^1%s^1 got caught in the destruction of %s^1's vehicle\n"), s2, s1));
+ print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
} else if(type == DEATH_WAKIGUN) {
HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
} else if(type == DEATH_WAKIBLOWUP) {
HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print (sprintf(_("^1%s^1 dies when %s^1's wakizashi dies.\n"), s2, s1));
+ print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
} else if(type == DEATH_RAPTOR_CANNON) {
HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
} else if(type == DEATH_RAPTOR_DEATH) {
HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
- print (sprintf(_("^1%s^1 dies when %s^1's raptor dies.\n"), s2, s1));
+ print (sprintf(_("^1%s^1 got caught in the blast when %s^1's destroys a vehicle\n"), s2, s1));
} else if(type == DEATH_TURRET) {
HUD_KillNotify_Push(s1, s2, 1, DEATH_GENERIC);
if(alsoprint)
self.deadflag = DEAD_DEAD;
self.vehicle_exit(VHEF_NORMAL);
- RadiusDamage (self, self, autocvar_g_vehicle_racer_blowup_coredamage,
+ RadiusDamage (self, self.enemy, autocvar_g_vehicle_racer_blowup_coredamage,
autocvar_g_vehicle_racer_blowup_edgedamage,
autocvar_g_vehicle_racer_blowup_radius, world,
autocvar_g_vehicle_racer_blowup_forceintensity,
{
self.deadflag = DEAD_DEAD;
self.vehicle_exit(VHEF_NORMAL);
- RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_WAKIBLOWUP, world);
+ RadiusDamage (self, self.enemy, 250, 15, 250, world, 250, DEATH_WAKIBLOWUP, world);
self.alpha = -1;
self.movetype = MOVETYPE_NONE;
SUB_SetFade(g1, time, min(autocvar_g_vehicle_spiderbot_respawntime, 10));
SUB_SetFade(g2, time, min(autocvar_g_vehicle_spiderbot_respawntime, 10));
- RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_SBBLOWUP, world);
+ RadiusDamage (self, self.enemy, 250, 15, 250, world, 250, DEATH_SBBLOWUP, world);
self.alpha = self.tur_head.alpha = self.gun1.alpha = self.gun2.alpha = -1;
self.movetype = MOVETYPE_NONE;
{
self.nextthink = time + 0.1;
- if(self.enemy)
- if(self.enemy.deadflag != DEAD_NO)
- self.enemy = targetdrone_getfear();
+ if(self.wp00)
+ if(self.wp00.deadflag != DEAD_NO)
+ self.wp00 = targetdrone_getfear();
- if(!self.enemy)
- self.enemy = targetdrone_getfear();
+ if(!self.wp00)
+ self.wp00 = targetdrone_getfear();
vector newdir;
- if(self.enemy)
- newdir = steerlib_push(self.enemy.origin) + randomvec() * 0.75;
+ if(self.wp00)
+ newdir = steerlib_push(self.wp00.origin) + randomvec() * 0.75;
else
newdir = randomvec() * 0.75;
newdir = newdir * 0.5 + normalize(self.velocity) * 0.5;
- if(self.enemy)
- self.velocity = normalize(newdir) * (500 + (1024 / min(vlen(self.enemy.origin - self.origin), 1024)) * 700);
+ if(self.wp00)
+ self.velocity = normalize(newdir) * (500 + (1024 / min(vlen(self.wp00.origin - self.origin), 1024)) * 700);
else
self.velocity = normalize(newdir) * 750;
if(DEATH_ISWEAPON(deathtype, WEP_MINSTANEX))
damage *= autocvar_g_vehicles_minstanex_damagerate;
-
+
+ self.enemy = attacker;
+
if((self.vehicle_flags & VHF_HASSHIELD) && (self.vehicle_shield > 0))
{
if (wasfreed(self.vehicle_shieldent) || self.vehicle_shieldent == world)
ret = findchain(classname, "vehicle_return");
while(ret)
{
- if(ret.enemy == self)
+ if(ret.wp00 == self)
{
ret.classname = "";
ret.think = SUB_Remove;
void vehicles_return()
{
- pointparticles(particleeffectnum("teleport"), self.enemy.origin + '0 0 64', '0 0 0', 1);
+ pointparticles(particleeffectnum("teleport"), self.wp00.origin + '0 0 64', '0 0 0', 1);
- self.enemy.think = vehicles_spawn;
- self.enemy.nextthink = time;
+ self.wp00.think = vehicles_spawn;
+ self.wp00.nextthink = time;
if(self.waypointsprite_attached)
WaypointSprite_Kill(self.waypointsprite_attached);
oldself = self;
self = spawn();
setmodel(self, "null");
- self.team = oldself.enemy.team;
- self.enemy = oldself.enemy;
- setorigin(self, oldself.enemy.pos1);
+ self.team = oldself.wp00.team;
+ self.wp00 = oldself.wp00;
+ setorigin(self, oldself.wp00.pos1);
self.nextthink = time + 5;
self.think = vehicles_showwp_goaway;
WaypointSprite_Spawn("vehicle", 0, 0, self, '0 0 64', world, 0, self, waypointsprite_attached, TRUE, RADARICON_POWERUP, rgb);
if(self.waypointsprite_attached)
{
- WaypointSprite_UpdateRule(self.waypointsprite_attached, self.enemy.team, SPRITERULE_DEFAULT);
+ WaypointSprite_UpdateRule(self.waypointsprite_attached, self.wp00.team, SPRITERULE_DEFAULT);
if(oldself == world)
WaypointSprite_UpdateBuildFinished(self.waypointsprite_attached, self.nextthink);
WaypointSprite_Ping(self.waypointsprite_attached);
ret = spawn();
ret.classname = "vehicle_return";
- ret.enemy = self;
+ ret.wp00 = self;
ret.team = self.team;
ret.think = vehicles_showwp;