]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/items/item/ammo.qc
Merge branch 'master' into cloudwalk9/mgburstfix
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / items / item / ammo.qc
index 2d487a7b51be6723a030f44af5e14d5997da9883..739d94aca1e8b3fb9954ce8a278570f96c6363cf 100644 (file)
@@ -1,50 +1,14 @@
 #include "ammo.qh"
-#ifdef SVQC
-    #include "../../../server/t_items.qh"
-#endif
 
-REGISTER_ITEM(Bullets, Ammo) {
-    this.m_model    =   "a_bullets.mdl";
-    this.m_name     =   "bullets";
-    this.m_icon     =   "ammo_bullets";
-#ifdef SVQC
-    this.m_botvalue =   2000;
-    this.m_itemid   =   IT_NAILS;
-#endif
-}
-REGISTER_ITEM(Cells, Ammo) {
-    this.m_model    =   "a_cells.md3";
-    this.m_name     =   "cells";
-    this.m_icon     =   "ammo_cells";
-#ifdef SVQC
-    this.m_botvalue =   2000;
-    this.m_itemid   =   IT_CELLS;
-#endif
-}
-REGISTER_ITEM(Plasma, Ammo) {
-    this.m_model    =   "a_cells.md3";
-    this.m_name     =   "plasma";
-    this.m_icon     =   "ammo_plasma";
 #ifdef SVQC
-    this.m_botvalue =   2000;
-    this.m_itemid   =   IT_PLASMA;
-#endif
-}
-REGISTER_ITEM(Rockets, Ammo) {
-    this.m_model    =   "a_rockets.md3";
-    this.m_name     =   "rockets";
-    this.m_icon     =   "ammo_rockets";
-#ifdef SVQC
-    this.m_botvalue =   3000;
-    this.m_itemid   =   IT_ROCKETS;
-#endif
+
+METHOD(Shells, m_spawnfunc_hookreplace, GameItem(Shells this, entity e))
+{
+       if (autocvar_sv_q3acompat_machineshotgunswap && !Item_IsLoot(e))
+       {
+               return ITEM_Bullets;
+       }
+       return this;
 }
-REGISTER_ITEM(Shells, Ammo) {
-    this.m_model    =   "a_shells.md3";
-    this.m_name     =   "shells";
-    this.m_icon     =   "ammo_shells";
-#ifdef SVQC
-    this.m_botvalue =   500;
-    this.m_itemid   =   IT_SHELLS;
+
 #endif
-}