if(autocvar_g_vehicle_bumblebee_cannon_lock)
{
if(gun.lock_time < time)
- gun.enemy = world;
+ gun.enemy = NULL;
if(trace_ent)
if(trace_ent.movetype)
fixedmakevectors(vehic.angles);
- if(player == vehic.gunner1) { vehic.gunner1 = world; }
- if(player == vehic.gunner2) { vehic.gunner2 = world; v_right *= -1; }
+ if(player == vehic.gunner1) { vehic.gunner1 = NULL; }
+ if(player == vehic.gunner2) { vehic.gunner2 = NULL; v_right *= -1; }
vector spot = real_origin(gunner);
spot = spot + v_up * 128 + v_forward * 300 + v_right * 150;
MUTATOR_CALLHOOK(VehicleExit, player, gunner);
- player.vehicle = world;
+ player.vehicle = NULL;
}
bool bumblebee_gunner_enter(entity this, entity player)
{
entity vehic = this;
- entity gunner = world;
+ entity gunner = NULL;
if(!vehic.gunner1 && !vehic.gunner2 && ((time >= vehic.gun1.phase) + (time >= vehic.gun2.phase)) == 2)
{
return true;
}
-void bumblebee_touch(entity this)
+void bumblebee_touch(entity this, entity toucher)
{
if(autocvar_g_vehicles_enter) { return; }
- if(this.gunner1 != world && this.gunner2 != world)
+ if(this.gunner1 != NULL && this.gunner2 != NULL)
{
- vehicles_touch(this);
+ vehicles_touch(this, toucher);
return;
}
- if(vehicles_valid_pilot(this, other))
+ if(vehicles_valid_pilot(this, toucher))
{
float phase_time = (time >= this.gun1.phase) + (time >= this.gun2.phase);
- if(time >= other.vehicle_enter_delay && phase_time)
- if(bumblebee_gunner_enter(this, other))
+ if(time >= toucher.vehicle_enter_delay && phase_time)
+ if(bumblebee_gunner_enter(this, toucher))
return;
}
- vehicles_touch(this);
+ vehicles_touch(this, toucher);
}
void bumblebee_regen(entity this)
if(autocvar_g_vehicle_bumblebee_healgun_locktime)
{
if(vehic.tur_head.lock_time < time || IS_DEAD(vehic.tur_head.enemy) || STAT(FROZEN, vehic.tur_head.enemy))
- vehic.tur_head.enemy = world;
+ vehic.tur_head.enemy = NULL;
if(trace_ent)
if(trace_ent.movetype)
if((teamplay && trace_ent.team == this.team) || !teamplay)
{
- if(trace_ent.vehicle_flags & VHF_ISVEHICLE)
+ if(IS_VEHICLE(trace_ent))
{
if(autocvar_g_vehicle_bumblebee_healgun_sps && trace_ent.vehicle_health <= trace_ent.max_health)
trace_ent.vehicle_shield = min(trace_ent.vehicle_shield + autocvar_g_vehicle_bumblebee_healgun_sps * frametime, trace_ent.tur_head.max_health);
if(vehic.gun3.enemy)
remove(vehic.gun3.enemy);
- vehic.gun3.enemy = world;
+ vehic.gun3.enemy = NULL;
}
*/
{
float hgt;
- hgt = raptor_altitude(this, 512);
+ hgt = vehicle_altitude(this, 512);
this.velocity = (this.velocity * 0.9) + ('0 0 -1800' * (hgt / 256) * sys_frametime);
this.angles_x *= 0.95;
this.angles_z *= 0.95;
setorigin(this.owner, spot);
antilag_clear(this.owner, CS(this.owner));
- this.owner = world;
+ this.owner = NULL;
}
void bumblebee_blowup(entity this)
{
RadiusDamage(this, this.enemy, autocvar_g_vehicle_bumblebee_blowup_coredamage,
autocvar_g_vehicle_bumblebee_blowup_edgedamage,
- autocvar_g_vehicle_bumblebee_blowup_radius, this, world,
+ autocvar_g_vehicle_bumblebee_blowup_radius, this, NULL,
autocvar_g_vehicle_bumblebee_blowup_forceintensity,
- DEATH_VH_BUMB_DEATH.m_id, world);
+ DEATH_VH_BUMB_DEATH.m_id, NULL);
sound(this, CH_SHOTS, SND_ROCKET_IMPACT, VOL_BASE, ATTEN_NORM);
Send_Effect(EFFECT_EXPLOSION_BIG, (this.origin + '0 0 100') + (randomvec() * 80), '0 0 0', 1);
remove(this);
}
+void bumblebee_dead_touch(entity this, entity toucher)
+{
+ bumblebee_blowup(this);
+}
+
void bumblebee_diethink(entity this)
{
if(time >= this.wait)
{
entity e = instance.gunner1;
instance.gun1.vehicle_exit(instance.gun1, VHEF_EJECT);
- entity oldother = other;
- other = e;
instance.phase = 0;
- gettouch(instance)(instance);
- other = oldother;
+ gettouch(instance)(instance, e);
return;
}
{
entity e = instance.gunner2;
instance.gun2.vehicle_exit(instance.gun2, VHEF_EJECT);
- entity oldother = other;
- other = e;
instance.phase = 0;
- gettouch(instance)(instance);
- other = oldother;
+ gettouch(instance)(instance, e);
return;
}
}
entity _body = vehicle_tossgib(instance, instance, instance.velocity + randomvec() * 200, "", rint(random()), rint(random()), 6, randomvec() * 100);
if(random() > 0.5)
- settouch(_body, bumblebee_blowup);
+ settouch(_body, bumblebee_dead_touch);
else
settouch(_body, func_null);
instance.scale = 1.5;
// Raygun beam
- if(instance.gun3.enemy == world)
+ if(instance.gun3.enemy == NULL)
{
instance.gun3.enemy = spawn();
Net_LinkEntity(instance.gun3.enemy, true, 0, bumble_raygun_send);