vehicles_projectile("bigplasma_muzzleflash", "weapons/flacexp3.wav",
v, normalize(v_forward + randomvec() * autocvar_g_vehicle_bumblebee_cannon_spread) * autocvar_g_vehicle_bumblebee_cannon_speed,
autocvar_g_vehicle_bumblebee_cannon_damage, autocvar_g_vehicle_bumblebee_cannon_radius, autocvar_g_vehicle_bumblebee_cannon_force, 0,
- DEATH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, TRUE, TRUE, _owner);
+ DEATH_VH_BUMB_GUN, PROJECTILE_BUMBLE_GUN, 0, TRUE, TRUE, _owner);
}
float bumb_gunner_frame()
void bumb_gunner_exit(float _exitflag)
{
-
-
- if(clienttype(self) == CLIENTTYPE_REAL)
+ if(IS_REAL_CLIENT(self))
{
msg_entity = self;
WriteByte(MSG_ONE, SVC_SETVIEWPORT);
self.movetype = MOVETYPE_WALK;
self.effects &~= EF_NODRAW;
self.alpha = 1;
- self.PlayerPhysplug = SUB_Null;
+ self.PlayerPhysplug = func_null;
self.view_ofs = PL_VIEW_OFS;
self.event_damage = PlayerDamage;
self.hud = HUD_NORMAL;
self.switchweapon = self.vehicle.switchweapon;
- if(self.flagcarried)
- {
- self.flagcarried.scale = 0.6;
- setattachment(self.flagcarried, self, "");
- setorigin(self.flagcarried, FLAG_CARRY_POS);
- }
+ vh_player = self;
+ vh_vehicle = self.vehicle;
+ MUTATOR_CALLHOOK(VehicleExit);
+ self = vh_player;
+ self.vehicle = vh_vehicle;
self.vehicle.vehicle_hudmodel.viewmodelforclient = self.vehicle;
other.solid = SOLID_NOT;
other.movetype = MOVETYPE_NOCLIP;
other.alpha = -1;
- other.event_damage = SUB_Null;
+ other.event_damage = func_null;
other.view_ofs = '0 0 0';
other.hud = _gun.hud;
other.PlayerPhysplug = _gun.PlayerPhysplug;
CSQCVehicleSetup(other, other.hud);
- if(other.flagcarried)
- {
- if(!autocvar_g_vehicles_allow_flagcarry)
- DropFlag(other.flagcarried, world, world);
- else
- {
- other.flagcarried.scale = 1;
- setattachment(other.flagcarried, self, "");
- setorigin(other.flagcarried, '0 0 1' * self.maxs_z);
- }
- }
+ vh_player = other;
+ vh_vehicle = _gun;
+ MUTATOR_CALLHOOK(VehicleEnter);
+ other = vh_player;
+ _gun = vh_vehicle;
return TRUE;
}
float vehicles_valid_pilot()
{
- if(other.classname != "player")
+ if not(IS_PLAYER(other))
return FALSE;
if(other.deadflag != DEAD_NO)
if(other.vehicle != world)
return FALSE;
- if(clienttype(other) != CLIENTTYPE_REAL)
+ if not(IS_REAL_CLIENT(other))
if(!autocvar_g_vehicles_allow_bots)
return FALSE;
if(autocvar_g_vehicle_bumblebee_healgun_hps)
trace_ent.vehicle_health = min(trace_ent.vehicle_health + autocvar_g_vehicle_bumblebee_healgun_hps * frametime, trace_ent.tur_health);
}
- else if(trace_ent.flags & FL_CLIENT)
+ else if(IS_CLIENT(trace_ent))
{
if(trace_ent.health <= autocvar_g_vehicle_bumblebee_healgun_hmax && autocvar_g_vehicle_bumblebee_healgun_hps)
trace_ent.health = min(trace_ent.health + autocvar_g_vehicle_bumblebee_healgun_hps * frametime, autocvar_g_vehicle_bumblebee_healgun_hmax);
autocvar_g_vehicle_bumblebee_blowup_edgedamage,
autocvar_g_vehicle_bumblebee_blowup_radius, self, world,
autocvar_g_vehicle_bumblebee_blowup_forceintensity,
- DEATH_WAKIBLOWUP, world);
+ DEATH_VH_BUMB_DEATH, world);
sound(self, CH_SHOTS, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
pointparticles(particleeffectnum("explosion_large"), randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
if(random() > 0.5)
_body.touch = bumb_blowup;
else
- _body.touch = SUB_Null;
+ _body.touch = func_null;
_body.think = bumb_diethink;
_body.nextthink = time;
pointparticles(particleeffectnum("explosion_medium"), findbetterlocation(self.origin, 16), '0 0 0', 1);
self.health = 0;
- self.event_damage = SUB_Null;
+ self.event_damage = func_null;
self.solid = SOLID_CORPSE;
self.takedamage = DAMAGE_NO;
self.deadflag = DEAD_DYING;
self.colormod = '0 0 0';
self.avelocity = '0 0 0';
self.velocity = '0 0 0';
- self.touch = SUB_Null;
+ self.touch = func_null;
self.nextthink = 0;
setorigin(self, self.pos1);