Xonotic
|
#include <common/command/_mod.qh>
#include <common/stats.qh>
#include "config.qh"
#include "weapon.qh"
#include <common/util.qh>
#include "all.inc"
Go to the source code of this file.
Macros | |
#define | _W_CONFIG(class, fld, T, wepname) |
#define | _W_NET(class, fld, T, wepname) |
#define | _W_PROP(class, fld, T, wepname) |
#define | _W_PROP_CVAR(wepname, fld) |
#define | _W_UPDATE(class, fld, T, wepname) |
#define | DEFAULT_FILENAME "weapons_dump.cfg" |
#define | EVAL_REGISTER_WEAPON(...) __VA_ARGS__ |
#define | REGISTER_WEAPON(...) EVAL_REGISTER_WEAPON(OVERLOAD(REGISTER_WEAPON, __VA_ARGS__)) |
#define | REGISTER_WEAPON_2(id, inst) REGISTER(Weapons, WEP, id, m_id, inst) |
#define | REGISTER_WEAPON_3(id, sname, inst) |
TODO: deprecated - remove. More... | |
#define | W_CONFIG(class, wepname, fld, T, m) W_CONFIG_##m(class, fld, T, wepname) |
#define | W_CONFIG_BEGIN(class) |
#define | W_CONFIG_BOTH(class, fld, T, wepname) |
#define | W_CONFIG_END() |
#define | W_CONFIG_NONE(class, fld, T, wepname) _W_CONFIG(class, fld, T, wepname) |
#define | W_CONFIG_PRI(class, fld, T, wepname) _W_CONFIG(class, primary_##fld, T, wepname) |
#define | W_CONFIG_SEC(class, fld, T, wepname) _W_CONFIG(class, secondary_##fld, T, wepname) |
#define | W_NET(class, wepname, fld, T, m) W_NET_##m(class, fld, T, wepname) |
#define | W_NET_BEGIN(class) |
#define | W_NET_BOTH(class, fld, T, wepname) |
#define | W_NET_END() |
#define | W_NET_NONE(class, fld, T, wepname) _W_NET(class, fld, T, wepname) |
#define | W_NET_PRI(class, fld, T, wepname) _W_NET(class, primary_##fld, T, wepname) |
#define | W_NET_SEC(class, fld, T, wepname) _W_NET(class, secondary_##fld, T, wepname) |
#define | W_PROP(class, wepname, fld, T, m) W_PROP_##m(class, fld, T, wepname) |
#define | W_PROP_BEGIN(class) |
#define | W_PROP_BOTH(class, fld, T, wepname) |
#define | W_PROP_END() |
#define | W_PROP_NONE(class, fld, T, wepname) _W_PROP(class, fld, T, wepname) |
#define | W_PROP_PRI(class, fld, T, wepname) _W_PROP(class, primary_##fld, T, wepname) |
#define | W_PROP_SEC(class, fld, T, wepname) _W_PROP(class, secondary_##fld, T, wepname) |
#define | W_PROPS(L, class, prefix) |
#define | W_UPDATE(class, wepname, fld, T, m) W_UPDATE_##m(class, fld, T, wepname) |
#define | W_UPDATE_BEGIN(class) |
#define | W_UPDATE_BOTH(class, fld, T, wepname) |
#define | W_UPDATE_END() |
#define | W_UPDATE_NONE(class, fld, T, wepname) _W_UPDATE(class, fld, T, wepname) |
#define | W_UPDATE_PRI(class, fld, T, wepname) _W_UPDATE(class, primary_##fld, T, wepname) |
#define | W_UPDATE_SEC(class, fld, T, wepname) _W_UPDATE(class, secondary_##fld, T, wepname) |
#define | WEP_CVAR(wepname, name) (_wep_##wepname.wepvar_##name) |
#define | WEP_CVAR_BOTH(wepname, isprimary, name) ((isprimary) ? WEP_CVAR_PRI(wepname, name) : WEP_CVAR_SEC(wepname, name)) |
#define | WEP_CVAR_PRI(wepname, name) WEP_CVAR(wepname, primary_##name) |
#define | WEP_CVAR_SEC(wepname, name) WEP_CVAR(wepname, secondary_##name) |
#define | WEP_HARDCODED_IMPULSES 20 |
#define | WEP_IMPULSE_BEGIN 230 |
#define | WEP_IMPULSE_END bound(WEP_IMPULSE_BEGIN, WEP_IMPULSE_BEGIN + (REGISTRY_COUNT(Weapons) - 1) - 1, 253) |
#define | WEP_LAST (REGISTRY_COUNT(Weapons) - 1) |
#define | WEPSET(id) (WEP_##id.m_wepset) |
#define | WepSet_FromWeapon(it) ((it).m_wepset) |
Functions | |
WepSet | _WepSet_FromWeapon (int i) |
GENERIC_COMMAND (dumpweapons, "Dump all turrets into " DEFAULT_FILENAME, false) | |
REGISTER_WEAPON (Null, NEW(Weapon)) | |
REGISTRY (Weapons, 72) STATIC_INIT(WeaponPickup) | |
STATIC_INIT (register_weapons_done) | |
Weapon | Weapon_from_name (string s) |
Variables | |
WepSet | m_wepset |
const int | WEP_FIRST = 1 |
WepSet | WEPSET_ALL |
WepSet | WEPSET_SUPERWEAPONS |
#define DEFAULT_FILENAME "weapons_dump.cfg" |
Definition at line 41 of file all.qh.
Referenced by GENERIC_COMMAND().
#define REGISTER_WEAPON | ( | ... | ) | EVAL_REGISTER_WEAPON(OVERLOAD(REGISTER_WEAPON, __VA_ARGS__)) |
#define REGISTER_WEAPON_3 | ( | id, | |
sname, | |||
inst | |||
) |
TODO: deprecated - remove.
#define W_CONFIG | ( | class, | |
wepname, | |||
fld, | |||
T, | |||
m | |||
) | W_CONFIG_##m(class, fld, T, wepname) |
#define W_CONFIG_BOTH | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) |
#define W_CONFIG_NONE | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_CONFIG(class, fld, T, wepname) |
#define W_CONFIG_PRI | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_CONFIG(class, primary_##fld, T, wepname) |
#define W_CONFIG_SEC | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_CONFIG(class, secondary_##fld, T, wepname) |
#define W_NET | ( | class, | |
wepname, | |||
fld, | |||
T, | |||
m | |||
) | W_NET_##m(class, fld, T, wepname) |
#define W_NET_BOTH | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) |
#define W_NET_NONE | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_NET(class, fld, T, wepname) |
#define W_NET_PRI | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_NET(class, primary_##fld, T, wepname) |
#define W_NET_SEC | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_NET(class, secondary_##fld, T, wepname) |
#define W_PROP | ( | class, | |
wepname, | |||
fld, | |||
T, | |||
m | |||
) | W_PROP_##m(class, fld, T, wepname) |
#define W_PROP_BOTH | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) |
#define W_PROP_NONE | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_PROP(class, fld, T, wepname) |
#define W_PROP_PRI | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_PROP(class, primary_##fld, T, wepname) |
#define W_PROP_SEC | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_PROP(class, secondary_##fld, T, wepname) |
#define W_PROPS | ( | L, | |
class, | |||
prefix | |||
) |
#define W_UPDATE | ( | class, | |
wepname, | |||
fld, | |||
T, | |||
m | |||
) | W_UPDATE_##m(class, fld, T, wepname) |
#define W_UPDATE_BOTH | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) |
#define W_UPDATE_NONE | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_UPDATE(class, fld, T, wepname) |
#define W_UPDATE_PRI | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_UPDATE(class, primary_##fld, T, wepname) |
#define W_UPDATE_SEC | ( | class, | |
fld, | |||
T, | |||
wepname | |||
) | _W_UPDATE(class, secondary_##fld, T, wepname) |
Definition at line 299 of file all.qh.
Referenced by havocbot_movetogoal(), HUD_Crosshair(), NET_HANDLE(), PlayerThink(), and weapon_prepareattack_checkammo().
#define WEP_CVAR_BOTH | ( | wepname, | |
isprimary, | |||
name | |||
) | ((isprimary) ? WEP_CVAR_PRI(wepname, name) : WEP_CVAR_SEC(wepname, name)) |
Definition at line 301 of file all.qh.
Referenced by HUD_Crosshair(), and NET_HANDLE().
#define WEP_IMPULSE_BEGIN 230 |
Definition at line 315 of file all.qh.
Referenced by STATIC_INIT(), and W_FixWeaponOrder().
#define WEP_IMPULSE_END bound(WEP_IMPULSE_BEGIN, WEP_IMPULSE_BEGIN + (REGISTRY_COUNT(Weapons) - 1) - 1, 253) |
Definition at line 316 of file all.qh.
Referenced by STATIC_INIT().
#define WEP_LAST (REGISTRY_COUNT(Weapons) - 1) |
Definition at line 305 of file all.qh.
Referenced by accuracy_send(), bot_cmd_select_weapon(), CSQC_Init(), HUD_Weapons(), NET_HANDLE(), W_FixWeaponOrder(), W_FixWeaponOrder_BuildImpulseList(), WeaponStats_LogItem(), and WeaponStats_ready().
#define WEPSET | ( | id | ) | (WEP_##id.m_wepset) |
Definition at line 37 of file all.qh.
Referenced by ClientConnect(), GiveBall(), havocbot_chooseweapon(), MUTATOR_HOOKFUNCTION(), NIX_GiveCurrentWeapon(), target_init_use(), and W_WeaponFrame().
#define WepSet_FromWeapon | ( | it | ) | ((it).m_wepset) |
Definition at line 38 of file all.qh.
Referenced by _StartItem(), client_hasweapon(), GiveItems(), GiveWeapon(), HUD_Weapons(), Item_GiveTo(), MUTATOR_HOOKFUNCTION(), SpawnThrownWeapon(), W_GiveWeapon(), W_RandomWeapons(), W_SwitchToOtherWeapon(), W_ThrowNewWeapon(), W_ThrowWeapon(), W_WeaponFrame(), and weapon_defaultspawnfunc().
Definition at line 53 of file all.qc.
References BIT, REGISTRY_MAX, and WEP_FIRST.
Referenced by STATIC_INIT().
GENERIC_COMMAND | ( | dumpweapons | , |
"Dump all turrets into " | DEFAULT_FILENAME, | ||
false | |||
) |
Definition at line 43 of file all.qh.
References argv(), CMD_REQUEST_COMMAND, CMD_REQUEST_USAGE, DEFAULT_FILENAME, Dump_Weapon_Settings(), entity(), fclose(), FILE_WRITE, fopen(), FOREACH, LOG_HELP, LOG_HELPF, LOG_INFO, LOG_INFOF, MSG_ALL, msg_entity, new_pure, NULL, setthink, STATIC_INIT_LATE(), time, to, and void().
REGISTRY | ( | Weapons | , |
72 | |||
) |
Definition at line 28 of file all.qh.
STATIC_INIT | ( | register_weapons_done | ) |
Definition at line 321 of file all.qh.
References _WepSet_FromWeapon(), autocvar_developer, CASE, colormapPaletteColor, entity(), ENUMCLASS, ENUMCLASS_END, FOREACH, ftos(), imp, localcmd, LOG_TRACEF, name, REGISTRY_GET, REGISTRY_MAX, REPLICATE_INIT(), shotdir, shotorg, strcat(), strzone(), substring(), vector(), W_FixWeaponOrder_AllowIncomplete(), weaponorder_byid, WEP_FLAG_SUPERWEAPON, WEP_IMPULSE_BEGIN, and WEP_IMPULSE_END.
Definition at line 134 of file all.qh.
References FOREACH, reload_time, and X().
Referenced by readplayerstartcvars(), W_Apply_Weaponreplace(), and weapon_defaultspawnfunc().
const int WEP_FIRST = 1 |
Definition at line 304 of file all.qh.
Referenced by _WepSet_FromWeapon(), accuracy_add(), accuracy_send(), CSQC_Init(), HUD_Weapons(), NET_HANDLE(), Scoreboard_AccuracyStats_Draw(), Scoreboard_AccuracyStats_WouldDraw(), W_FixWeaponOrder(), W_FixWeaponOrder_BuildImpulseList(), weapon_byid_handle(), WeaponStats_LogItem(), and WeaponStats_ready().
WepSet WEPSET_SUPERWEAPONS |
Definition at line 307 of file all.qh.
Referenced by GiveItems(), Item_ItemsTime_Allow(), Item_Reset(), Item_Respawn(), Item_ScheduleRespawnIn(), Item_Show(), player_powerups(), PutPlayerInServer(), and W_ThrowNewWeapon().