]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/ammo.qc
Merge branch 'master' into terencehill/bot_waypoints
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / ammo.qc
index d7e0dcc6872d0d55b9d7b00aad234920acf5cb45..3a13a1f81855c51c2eaeea4bea5adda6e10c07b3 100644 (file)
@@ -1 +1,23 @@
 #include "ammo.qh"
+
+#ifdef SVQC
+
+METHOD(Bullets, m_spawnfunc_hookreplace, GameItem(Bullets this, entity e))
+{
+       if (autocvar_sv_q3acompat_machineshotgunswap && !Item_IsLoot(e))
+       {
+               return ITEM_Shells;
+       }
+       return this;
+}
+
+METHOD(Shells, m_spawnfunc_hookreplace, GameItem(Shells this, entity e))
+{
+       if (autocvar_sv_q3acompat_machineshotgunswap && !Item_IsLoot(e))
+       {
+               return ITEM_Bullets;
+       }
+       return this;
+}
+
+#endif