bool SendAuxiliaryXhair(entity this, entity to, int sf)
{
- WriteByte(MSG_ENTITY, ENT_CLIENT_AUXILIARYXHAIR);
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_AUXILIARYXHAIR);
WriteByte(MSG_ENTITY, self.cnt);
msg_entity = own;
- WriteByte(MSG_ONE, SVC_TEMPENTITY);
- WriteByte(MSG_ONE, TE_CSQC_VEHICLESETUP);
+ WriteHeader(MSG_ONE, TE_CSQC_VEHICLESETUP);
WriteByte(MSG_ONE, vehicle_id);
}
proj.use = vehicles_projectile_explode;
proj.owner = self;
proj.realowner = _owner;
- proj.think = SUB_Remove;
+ proj.think = SUB_Remove_self;
proj.nextthink = time + 30;
if(_health)
if(ret.wp00 == veh)
{
ret.classname = "";
- ret.think = SUB_Remove;
+ ret.think = SUB_Remove_self;
ret.nextthink = time + 0.1;
if(ret.waypointsprite_attached)
float _ftmp;
_ftmp = self.owner.vehicle_health / 50;
self.pain_frame = time + 0.1 + (random() * 0.5 * _ftmp);
- pointparticles(particleeffectnum(EFFECT_SMOKE_SMALL), (self.origin + (randomvec() * 80)), '0 0 0', 1);
+ pointparticles(EFFECT_SMOKE_SMALL, (self.origin + (randomvec() * 80)), '0 0 0', 1);
if(self.vehicle_flags & VHF_DMGSHAKE)
self.velocity += randomvec() * 30;
vehicles_enter(other, self);
}
-bool vehicle_impulse(int imp)
-{SELFPARAM();
- switch(imp)
+bool vehicle_impulse(entity this, int imp)
+{
+ entity v = this.vehicle;
+ if (!v) return false;
+ if (v.deadflag != DEAD_NO) return false;
+ bool(int) f = v.vehicles_impulse;
+ if (f && f(imp)) return true;
+ switch (imp)
{
case 17:
{
return true;
}
}
-
return false;
}