Weapon w = WEP_NEXBALL;
w.wr_resetplayer(w, plyr);
PS(plyr).m_switchweapon = WEP_NEXBALL;
- WITHSELF(plyr, W_SwitchWeapon(plyr, WEP_NEXBALL));
+ W_SwitchWeapon(plyr, WEP_NEXBALL);
}
void DropBall(entity ball, vector org, vector vel)
if(ITEM_DAMAGE_NEEDKILL(deathtype))
{
this.takedamage = DAMAGE_NO;
- WITHSELF(this, nade_boom(this));
+ nade_boom(this);
return;
}
void Item_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(ITEM_DAMAGE_NEEDKILL(deathtype))
- WITHSELF(this, RemoveItem(this));
+ RemoveItem(this);
}
void _StartItem(entity this, entity def, float defaultrespawntime, float defaultrespawntimejitter)
return;
this.enemy = actor;
- WITHSELF(this, button_fire(this));
+ button_fire(this);
}
void button_touch(entity this)
if (this.health <= 0)
{
this.enemy = damage_attacker;
- WITHSELF(this, button_fire(this));
+ button_fire(this);
}
}
entity e = this;
do {
if (e.classname == "door") {
- WITHSELF(e, door_go_down(e));
+ door_go_down(e);
} else {
- WITHSELF(e, door_rotating_go_down(e));
+ door_rotating_go_down(e);
}
e = e.enemy;
} while ((e != this) && (e != NULL));
this.dest1 = this.origin + v_right * (this.t_width * temp);
this.dest2 = this.dest1 + v_forward * this.t_length;
- WITHSELF(this, SUB_CalcMove(this, this.dest1, TSPEED_LINEAR, this.speed, fd_secret_move1));
+ SUB_CalcMove(this, this.dest1, TSPEED_LINEAR, this.speed, fd_secret_move1);
if (this.noise2 != "")
_sound(this, CH_TRIGGER_SINGLE, this.noise2, VOL_BASE, ATTEN_NORM);
}
// but we will need these
//this.move_nextthink = this.move_ltime + 0.1;
//this.move_think = train_next;
- WITHSELF(this, train_next(this));
+ train_next(this);
this.move_movetype = MOVETYPE_PUSH;
this.move_origin = this.origin;
#endif
if (this.enemy.state == 2) {
- entity e = this.enemy;
- WITHSELF(e, plat_go_up(e));
+ plat_go_up(this.enemy);
} else if (this.enemy.state == 1)
this.enemy.SUB_NEXTTHINK = this.enemy.SUB_LTIME + 1;
}
if (this.enemy.state == 1) {
entity e = this.enemy;
- WITHSELF(e, plat_go_down(e));
+ plat_go_down(e);
}
}
if(this.move_think)
return;
#endif
- WITHSELF(this, plat_go_down(this));
+ plat_go_down(this);
}
this.use = func_null;
if (this.state != 4)
objerror ("plat_use: not in up state");
- WITHSELF(this, plat_go_down(this));
+ plat_go_down(this);
}
.string sound1, sound2;
void SUB_CalcMoveEnt (entity ent, vector tdest, float tspeedtype, float tspeed, void(entity this) func)
{
- WITHSELF(ent, SUB_CalcMove(ent, tdest, tspeedtype, tspeed, func));
+ SUB_CalcMove(ent, tdest, tspeedtype, tspeed, func);
}
/*
void SUB_CalcAngleMoveEnt (entity ent, vector destangle, float tspeedtype, float tspeed, void(entity this) func)
{
- WITHSELF(ent, SUB_CalcAngleMove (ent, destangle, tspeedtype, tspeed, func));
+ SUB_CalcAngleMove (ent, destangle, tspeedtype, tspeed, func);
}
FOREACH_ENTITY_CLASS("target_music", true, {
it.volume = 0;
if (it.targetname == "")
- WITHSELF(it, target_music_sendto(it, MSG_ALL, 1));
+ target_music_sendto(it, MSG_ALL, 1);
else
- WITHSELF(it, target_music_sendto(it, MSG_ALL, 0));
+ target_music_sendto(it, MSG_ALL, 0);
});
}
void target_music_use(entity this, entity actor, entity trigger)
}
else if (this.wait == 0)
{
- WITHSELF(this, multi_wait(this)); // waiting finished
+ multi_wait(this); // waiting finished
}
else
{ // we can't just remove (this) here, because this is a touch function
METHOD(Turret, tr_attack, void(Turret this, entity it)) {
Weapon w = this.m_weapon;
.entity weaponentity = weaponentities[0];
- w.wr_think(w, this, weaponentity, 1);
+ w.wr_think(w, it, weaponentity, 1);
}
#endif
/** (ALL) */
void vehicles_projectile_explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, vehicles_projectile_explode(this));
+ vehicles_projectile_explode(this);
}
entity vehicles_projectile(entity this, string _mzlfx, Sound _mzlsound,
void W_Arc_Bolt_Explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Arc_Bolt_Explode(this));
+ W_Arc_Bolt_Explode(this);
}
void W_Arc_Bolt_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
void W_Electro_Explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Electro_Explode(this));
+ W_Electro_Explode(this);
}
void W_Electro_TouchExplode(entity this)
void W_Fireball_Explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Fireball_Explode(this));
+ W_Fireball_Explode(this);
}
void W_Fireball_TouchExplode(entity this)
void W_Hagar_Explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Hagar_Explode(this));
+ W_Hagar_Explode(this);
}
void W_Hagar_Explode2(entity this)
void W_Hagar_Explode2_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Hagar_Explode2(this));
+ W_Hagar_Explode2(this);
}
void W_Hagar_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
void W_Hook_Explode2_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Hook_Explode2(this));
+ W_Hook_Explode2(this);
}
void W_Hook_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
void W_Mortar_Grenade_Explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Mortar_Grenade_Explode(this));
+ W_Mortar_Grenade_Explode(this);
}
void W_Mortar_Grenade_Explode2(entity this)
void W_Mortar_Grenade_Explode2_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Mortar_Grenade_Explode2(this));
+ W_Mortar_Grenade_Explode2(this);
}
void W_Mortar_Grenade_Damage(entity this, entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
if(p.porto_current.realowner == p && p.porto_current.classname == "porto")
{
- WITHSELF(p.porto_current, W_Porto_Fail(p.porto_current, 1));
+ W_Porto_Fail(p.porto_current, 1);
}
}
void W_Seeker_Flac_Explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_Seeker_Flac_Explode(this));
+ W_Seeker_Flac_Explode(this);
}
void W_Seeker_Fire_Flac(Weapon thiswep, entity actor)
switch(c)
{
case 0:
- WITHSELF(own, W_Seeker_Fire_Missile(WEP_SEEKER, own, '-1.25 -3.75 0', own.enemy));
+ W_Seeker_Fire_Missile(WEP_SEEKER, own, '-1.25 -3.75 0', own.enemy);
break;
case 1:
- WITHSELF(own, W_Seeker_Fire_Missile(WEP_SEEKER, own, '+1.25 -3.75 0', own.enemy));
+ W_Seeker_Fire_Missile(WEP_SEEKER, own, '+1.25 -3.75 0', own.enemy);
break;
case 2:
- WITHSELF(own, W_Seeker_Fire_Missile(WEP_SEEKER, own, '-1.25 +3.75 0', own.enemy));
+ W_Seeker_Fire_Missile(WEP_SEEKER, own, '-1.25 +3.75 0', own.enemy);
break;
case 3:
default:
- WITHSELF(own, W_Seeker_Fire_Missile(WEP_SEEKER, own, '+1.25 +3.75 0', own.enemy));
+ W_Seeker_Fire_Missile(WEP_SEEKER, own, '+1.25 +3.75 0', own.enemy);
break;
}
void W_RocketMinsta_Laser_Explode_use(entity this, entity actor, entity trigger)
{
- WITHSELF(this, W_RocketMinsta_Laser_Explode(this));
+ W_RocketMinsta_Laser_Explode(this);
}
void W_RocketMinsta_Laser_Touch (entity this)
if (it.reset2) it.reset2(it);
});
- FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), LAMBDA(WITHSELF(it, Unfreeze(it))));
+ FOREACH_CLIENT(IS_PLAYER(it) && STAT(FROZEN, it), LAMBDA(Unfreeze(it)));
// Moving the player reset code here since the player-reset depends
// on spawnpoint entities which have to be reset first --blub
FOREACH_ENTITY_FLAGS(vehicle_flags, VHF_ISVEHICLE, LAMBDA(
vehicles_clearreturn(it);
- WITHSELF(it, vehicles_spawn(it));
+ vehicles_spawn(it);
));
// up round counter