#include "bumblebee.qh"
#ifdef SVQC
+#include "vehicle.qh"
void bumb_fire_cannon(entity _gun, string _tagname, entity _owner)
{
vector v = gettaginfo(_gun, gettagindex(_gun, _tagname));
self.hud = HUD_NORMAL;
self.switchweapon = self.vehicle.switchweapon;
- vh_player = self;
- vh_vehicle = self.vehicle;
- MUTATOR_CALLHOOK(VehicleExit);
- self = vh_player;
- self.vehicle = vh_vehicle;
+ MUTATOR_CALLHOOK(VehicleExit, self, self.vehicle);
self.vehicle.vehicle_hudmodel.viewmodelforclient = self.vehicle;
CSQCVehicleSetup(other, other.hud);
- vh_player = other;
- vh_vehicle = _gun;
- MUTATOR_CALLHOOK(VehicleEnter);
- other = vh_player;
- _gun = vh_vehicle;
+ MUTATOR_CALLHOOK(VehicleEnter, other, _gun);
return true;
}
}
+.vector hook_start, hook_end;
float bumb_pilot_frame()
{
entity pilot, vehic;
if((teamplay && trace_ent.team == pilot.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.tur_health)
trace_ent.vehicle_shield = min(trace_ent.vehicle_shield + autocvar_g_vehicle_bumblebee_healgun_sps * frametime, trace_ent.tur_head.tur_health);
trace_ent.health = min(trace_ent.health + autocvar_g_vehicle_bumblebee_healgun_hps * frametime, autocvar_g_vehicle_bumblebee_healgun_hmax);
}
- else if(trace_ent.turrcaps_flags & TFL_TURRCAPS_ISTURRET)
+ else if(IS_TURRET(trace_ent))
{
if(trace_ent.health <= trace_ent.tur_health && autocvar_g_vehicle_bumblebee_healgun_hps)
trace_ent.health = min(trace_ent.health + autocvar_g_vehicle_bumblebee_healgun_hps * frametime, trace_ent.tur_health);
DEATH_VH_BUMB_DEATH, world);
sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
- pointparticles(particleeffectnum("explosion_large"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+ Send_Effect("explosion_large", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
if(self.owner.deadflag == DEAD_DYING)
self.owner.deadflag = DEAD_DEAD;
if(random() < 0.1)
{
sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTEN_NORM);
- pointparticles(particleeffectnum("explosion_small"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
+ Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
}
self.nextthink = time + 0.1;
_body.owner = self;
_body.enemy = self.enemy;
- pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
+ Send_Effect("explosion_medium", findbetterlocation(self.origin, 16), '0 0 0', 1);
self.health = 0;
self.event_damage = func_null;
}
}
-float bumble_raygun_send(entity to, float sf)
+float bumble_raygun_send(entity to, int sf)
{
WriteByte(MSG_ENTITY, ENT_CLIENT_BUMBLE_RAYGUN);