W_PrepareExplosionByDamage(this, attacker, adaptor_think2use);
}
-void W_Mortar_Grenade_Think1()
-{SELFPARAM();
+void W_Mortar_Grenade_Think1(entity this)
+{
self.nextthink = time;
if(time > self.cnt)
{
W_Mortar_Grenade_Explode();
}
-void W_Mortar_Grenade_Touch1()
-{SELFPARAM();
+void W_Mortar_Grenade_Touch1(entity this)
+{
PROJECTILE_TOUCH;
if(other.takedamage == DAMAGE_AIM || WEP_CVAR_PRI(mortar, type) == 0) // always explode when hitting a player, or if normal mortar projectile
{
}
}
-void W_Mortar_Grenade_Touch2()
-{SELFPARAM();
+void W_Mortar_Grenade_Touch2(entity this)
+{
PROJECTILE_TOUCH;
if(other.takedamage == DAMAGE_AIM || WEP_CVAR_SEC(mortar, type) == 0) // always explode when hitting a player, or if normal mortar projectile
{
gren.cnt = time + WEP_CVAR_PRI(mortar, lifetime);
gren.nextthink = time;
- gren.think = W_Mortar_Grenade_Think1;
+ setthink(gren, W_Mortar_Grenade_Think1);
gren.use = W_Mortar_Grenade_Explode_use;
- gren.touch = W_Mortar_Grenade_Touch1;
+ settouch(gren, W_Mortar_Grenade_Touch1);
gren.takedamage = DAMAGE_YES;
gren.health = WEP_CVAR_PRI(mortar, health);
setsize(gren, '-3 -3 -3', '3 3 3');
gren.nextthink = time + WEP_CVAR_SEC(mortar, lifetime);
- gren.think = adaptor_think2use_hittype_splash;
+ setthink(gren, adaptor_think2use_hittype_splash);
gren.use = W_Mortar_Grenade_Explode2_use;
- gren.touch = W_Mortar_Grenade_Touch2;
+ settouch(gren, W_Mortar_Grenade_Touch2);
gren.takedamage = DAMAGE_YES;
gren.health = WEP_CVAR_SEC(mortar, health);