#define WEAPONS_ALL_C
#if defined(CSQC)
- #include <client/autocvars.qh>
#include <client/main.qh>
#include <common/constants.qh>
#include <common/deathtypes/all.qh>
#include <lib/warpzone/common.qh>
#include <lib/warpzone/server.qh>
#include <lib/warpzone/util_server.qh>
- #include <server/autocvars.qh>
#include <server/command/_mod.qh>
#include <server/hook.qh>
#include <server/items/spawning.qh>
if (a >= 24)
{
a -= 24;
- return '0 0 1' * (2 ** a);
+ return '0 0 1' * BIT(a);
}
- return '0 1 0' * (2 ** a);
+ return '0 1 0' * BIT(a);
}
- return '1 0 0' * (2 ** a);
+ return '1 0 0' * BIT(a);
}
#ifdef SVQC
void WriteWepSet(float dst, WepSet w)
}
}
+entity GetAmmoItem(int ammotype)
+{
+ switch (ammotype)
+ {
+ case RES_SHELLS: return ITEM_Shells;
+ case RES_BULLETS: return ITEM_Bullets;
+ case RES_ROCKETS: return ITEM_Rockets;
+ case RES_CELLS: return ITEM_Cells;
+ case RES_PLASMA: return ITEM_Plasma;
+ case RES_FUEL: return ITEM_JetpackFuel;
+ }
+ LOG_WARNF("Invalid ammo type %d ", ammotype);
+ return NULL;
+ // WEAPONTODO: use this generic func to reduce duplication ?
+ // GetAmmoPicture GetAmmoName notif_arg_item_wepammo ammo_pickupevalfunc ?
+}
+
#ifdef CSQC
int GetAmmoTypeFromNum(int i)
{
LOG_INFOF("Incorrect parameters for ^2%s^7", argv(0));
case CMD_REQUEST_USAGE:
{
- LOG_HELP("Usage:^3 cl_cmd weapon_find weapon");
- LOG_HELP(" Where 'weapon' is the lowercase weapon name, 'all' or 'unowned'.");
+ LOG_HELP("Usage:^3 cl_cmd weapon_find <weapon>");
+ LOG_HELP(" Where <weapon> is the lowercase weapon name, 'all' or 'unowned'.");
return;
}
}