// compatibility:
spawnfunc(item_quad) { this.classname = "item_strength";spawnfunc_item_strength(this);}
-void target_items_use()
-{SELFPARAM();
- if(activator.classname == "droppedweapon")
+void target_items_use(entity this, entity actor, entity trigger)
+{
+ other = trigger; // TODO
+
+ if(actor.classname == "droppedweapon")
{
EXACTTRIGGER_TOUCH;
- remove(activator);
+ remove(actor);
return;
}
- if (!IS_PLAYER(activator))
+ if (!IS_PLAYER(actor))
return;
- if(IS_DEAD(activator))
+ if(IS_DEAD(actor))
return;
EXACTTRIGGER_TOUCH;
- FOREACH_ENTITY_ENT(enemy, activator,
+ FOREACH_ENTITY_ENT(enemy, actor,
{
if(it.classname == "droppedweapon")
remove(it);
});
- if(GiveItems(activator, 0, tokenize_console(self.netname)))
- centerprint(activator, self.message);
+ if(GiveItems(actor, 0, tokenize_console(this.netname)))
+ centerprint(actor, this.message);
}
spawnfunc(target_items)
float n, i;
string s;
- self.use = target_items_use;
+ self.use1 = target_items_use;
if(!self.strength_finished)
self.strength_finished = autocvar_g_balance_powerup_strength_time;
if(!self.invincible_finished)