REGISTER_ITEM(Bullets, Ammo) {
this.m_model = "models/items/a_bullets.mdl";
this.m_name = "bullets";
+ this.m_ammoPic = "ammo_bullets";
#ifdef SVQC
this.m_botvalue = 2000;
this.m_itemid = IT_NAILS;
REGISTER_ITEM(Cells, Ammo) {
this.m_model = "models/items/a_cells.md3";
this.m_name = "cells";
+ this.m_ammoPic = "ammo_cells";
#ifdef SVQC
this.m_botvalue = 2000;
this.m_itemid = IT_CELLS;
REGISTER_ITEM(Plasma, Ammo) {
this.m_model = "models/items/a_cells.md3";
this.m_name = "plasma";
+ this.m_ammoPic = "ammo_cells";
#ifdef SVQC
this.m_botvalue = 2000;
this.m_itemid = IT_PLASMA;
REGISTER_ITEM(Rockets, Ammo) {
this.m_model = "models/items/a_rockets.md3";
this.m_name = "rockets";
+ this.m_ammoPic = "ammo_rockets";
#ifdef SVQC
this.m_botvalue = 3000;
this.m_itemid = IT_ROCKETS;
REGISTER_ITEM(Shells, Ammo) {
this.m_model = "models/items/a_shells.md3";
this.m_name = "shells";
+ this.m_ammoPic = "ammo_shells";
#ifdef SVQC
this.m_botvalue = 500;
this.m_itemid = IT_SHELLS;
#define AMMO_H
#include "pickup.qh"
CLASS(Ammo, Pickup)
+ ATTRIB(Ammo, m_ammoPic, string, string_null)
#ifdef SVQC
ATTRIB(Ammo, m_pickupevalfunc, float(entity player, entity item), commodity_pickupevalfunc)
ATTRIB(Ammo, m_respawntime, float(), GET(g_pickup_respawntime_ammo))
#include "../../../server/constants.qh"
#endif
-REGISTER_ITEM(Jetpack, Pickup) {
+#include "ammo.qh"
+#include "powerup.qh"
+
+REGISTER_ITEM(Jetpack, Powerup) {
this.m_model = "models/items/g_jetpack.md3";
this.m_name = "Jet pack";
#ifdef SVQC
this.m_botvalue = BOT_PICKUP_RATING_LOW;
- this.m_itemflags = FL_POWERUP;
this.m_itemid = IT_JETPACK;
this.m_pickupevalfunc = commodity_pickupevalfunc;
- this.m_respawntime = GET(g_pickup_respawntime_powerup);
- this.m_respawntimejitter = GET(g_pickup_respawntimejitter_powerup);
#endif
}
-REGISTER_ITEM(JetpackFuel, Pickup) {
- this.m_model = "models/items/g_fuel.md3";
- this.m_name = "Fuel";
+REGISTER_ITEM(JetpackFuel, Ammo) {
+ this.m_model = "models/items/g_fuel.md3";
+ this.m_name = "Fuel";
+ this.m_ammoPic = "ammo_fuel";
#ifdef SVQC
- this.m_botvalue = BOT_PICKUP_RATING_LOW;
- this.m_itemid = IT_FUEL;
- this.m_pickupevalfunc = commodity_pickupevalfunc;
- this.m_respawntime = GET(g_pickup_respawntime_ammo);
- this.m_respawntimejitter = GET(g_pickup_respawntimejitter_ammo);
+ this.m_botvalue = BOT_PICKUP_RATING_LOW;
+ this.m_itemid = IT_FUEL;
#endif
}
string GetAmmoPicture(.int ammotype)
{
- switch(ammotype)
+ switch (ammotype)
{
- case ammo_shells: return "ammo_shells";
- case ammo_nails: return "ammo_bullets";
- case ammo_rockets: return "ammo_rockets";
- case ammo_cells: return "ammo_cells";
- case ammo_plasma: return "ammo_cells";
- case ammo_fuel: return "ammo_fuel";
+ case ammo_shells: return ITEM_Shells.m_ammoPic;
+ case ammo_nails: return ITEM_Bullets.m_ammoPic;
+ case ammo_rockets: return ITEM_Rockets.m_ammoPic;
+ case ammo_cells: return ITEM_Cells.m_ammoPic;
+ case ammo_plasma: return ITEM_Plasma.m_ammoPic;
+ case ammo_fuel: return ITEM_JetpackFuel.m_ammoPic;
default: return ""; // wtf, no ammo type?
}
}