]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/t_items.qc
Merge branch 'master' into Mario/use1
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / t_items.qc
index 85ba9f51b3471bac94a42f0d967f1dd7f2e7961b..a3ac40b670010a39cfff08aea30f1c7c826b4037 100644 (file)
@@ -1421,29 +1421,31 @@ spawnfunc(item_invincible)
 // 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)