]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/mutators/base.qh
Fix ItemTouch mutator hook usage (fixes #1572)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / base.qh
index b2f9b29fda64b36d1df56e15536b2b3ad45168d2..a6c6f3a7e58a232bac1e04ddc2e15dc25faf9606 100644 (file)
@@ -292,6 +292,9 @@ MUTATOR_HOOKABLE(ItemTouch);
        // called at when a item is touched. Called early, can edit item properties.
        entity self;    // item
        entity other;   // player
+       #define MUT_ITEMTOUCH_CONTINUE 0 // return this flag to make the function continue as normal
+       #define MUT_ITEMTOUCH_RETURN 1 // return this flag to make the function return (handled entirely by mutator)
+       #define MUT_ITEMTOUCH_PICKUP 2 // return this flag to have the item "picked up" and taken even after mutator handled it
 
 MUTATOR_HOOKABLE(ClientConnect);
        // called at when a player connect