#include "ammo.qh"
-#ifdef SVQC
- #include "../../../server/t_items.qh"
-#endif
-REGISTER_ITEM(Bullets, Ammo) {
- this.m_model = "models/items/a_bullets.mdl";
- this.m_name = "bullets";
-#ifdef SVQC
- this.m_botvalue = 2000;
- this.m_itemid = IT_NAILS;
-#endif
-}
-REGISTER_ITEM(Cells, Ammo) {
- this.m_model = "models/items/a_cells.md3";
- this.m_name = "cells";
-#ifdef SVQC
- this.m_botvalue = 2000;
- this.m_itemid = IT_CELLS;
-#endif
-}
-REGISTER_ITEM(Plasma, Ammo) {
- this.m_model = "models/items/a_cells.md3";
- this.m_name = "plasma";
#ifdef SVQC
- this.m_botvalue = 2000;
- this.m_itemid = IT_PLASMA;
-#endif
+
+METHOD(Bullets, m_spawnfunc_hookreplace, GameItem(Bullets this, entity e))
+{
+ if (autocvar_sv_q3acompat_machineshotgunswap && !Item_IsLoot(e))
+ {
+ return ITEM_Shells;
+ }
+ return this;
}
-REGISTER_ITEM(Rockets, Ammo) {
- this.m_model = "models/items/a_rockets.md3";
- this.m_name = "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 = "models/items/a_shells.md3";
- this.m_name = "shells";
-#ifdef SVQC
- this.m_botvalue = 500;
- this.m_itemid = IT_SHELLS;
+
#endif
-}