proj.bot_dodge = true;
proj.bot_dodgerating = _dmg;
proj.velocity = _vel;
- proj.touch = vehicles_projectile_explode;
+ settouch(proj, vehicles_projectile_explode);
proj.use = vehicles_projectile_explode_use;
proj.owner = this;
proj.realowner = _owner;
{
_gib.think = vehicles_gib_explode;
_gib.nextthink = time + random() * _explode;
- _gib.touch = vehicles_gib_explode;
+ settouch(_gib, vehicles_gib_explode);
}
else
{
void vehicles_enter(entity pl, entity veh)
{
- SELFPARAM();
-
// Remove this when bots know how to use vehicles
if((IS_BOT_CLIENT(pl) && !autocvar_g_vehicles_allow_bots))
return;
self.vehicle_hudmodel.viewmodelforclient = self;
self.owner = world;
- self.touch = vehicles_touch;
+ settouch(self, vehicles_touch);
self.event_damage = vehicles_damage;
self.iscreature = true;
self.teleportable = false; // no teleporting for vehicles, too buggy
this.vehicleid = info.vehicleid;
this.PlayerPhysplug = info.PlayerPhysplug;
this.event_damage = func_null;
- this.touch = vehicles_touch;
+ settouch(this, vehicles_touch);
this.think = vehicles_spawn;
this.nextthink = time;
this.effects = EF_NODRAW;