#include "ammo.qh"
-#include "../../../server/t_items.qh"
+#ifdef SVQC
+ #include "../../../server/t_items.qh"
+#endif
-#define REGISTER_AMMO(id, model, sound, name, itemid, botvalue) \
-REGISTER_ITEM(id, Ammo, LAMBDA({ \
- this.m_model = model; \
- this.m_sound = sound; \
- this.m_respawntime = SPAWNTIME_AMMO; \
- this.m_respawntimejitter = SPAWNTIME_AMMO; \
- this.m_name = name; \
- this.m_itemid = itemid; \
- this.m_botvalue = botvalue; \
-}))
-
-REGISTER_AMMO(Bullets
- , "models/items/a_bullets.mdl"
- , "misc/itempickup.wav"
- , "bullets"
- , IT_NAILS
- , 2000
-)
-REGISTER_AMMO(Cells
- , "models/items/a_cells.md3"
- , "misc/itempickup.wav"
- , "cells"
- , IT_ROCKETS
- , 2000
-)
-REGISTER_AMMO(Plasma
- , "models/items/a_cells.md3"
- , "misc/itempickup.wav"
- , "plasma"
- , IT_ROCKETS
- , 2000
-)
-REGISTER_AMMO(Rockets
- , "models/items/a_rockets.md3"
- , "misc/itempickup.wav"
- , "rockets"
- , IT_ROCKETS
- , 3000
-)
-REGISTER_AMMO(Shells
- , "models/items/a_shells.md3"
- , "misc/itempickup.wav"
- , "shells"
- , IT_SHELLS
- , 500
-)
+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
+}
+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
+}