if(complain_weapon_name)
strunzone(complain_weapon_name);
- complain_weapon_name = strzone(W_Name(complain_weapon));
+ complain_weapon_name = strzone(WEP_NAME(complain_weapon));
complain_weapon_type = ReadByte();
ARG_CASE(ARG_CS_SV, "spree_inf", (autocvar_notification_show_sprees ? notif_arg_spree_inf(1, input, s2, f2) : "")) \
ARG_CASE(ARG_CS_SV, "spree_end", (autocvar_notification_show_sprees ? notif_arg_spree_inf(-1, "", "", f1) : "")) \
ARG_CASE(ARG_CS_SV, "spree_lost", (autocvar_notification_show_sprees ? notif_arg_spree_inf(-2, "", "", f1) : "")) \
- ARG_CASE(ARG_CS_SV, "item_wepname", W_Name(f1)) \
+ ARG_CASE(ARG_CS_SV, "item_wepname", WEP_NAME(f1)) \
ARG_CASE(ARG_CS_SV, "item_wepammo", (s1 != "" ? sprintf(_(" with %s"), s1) : "")) \
ARG_CASE(ARG_DC, "item_centime", ftos(autocvar_notification_item_centerprinttime)) \
ARG_CASE(ARG_SV, "death_team", Team_ColoredFullName(f1)) \
WEP_CONFIG_WRITETOFILE(sprintf(
"// {{{ #%d: %s%s\n",
i,
- W_Name(i),
+ WEP_NAME(i),
(((get_weaponinfo(i)).spawnflags & WEP_FLAG_MUTATORBLOCKED) ? " (MUTATOR WEAPON)" : "")
))
for(x = 0; x <= WEP_CONFIG_COUNT; ++x) { WEP_CONFIG_WRITETOFILE(wep_config_queue[x]) }
WEP_CONFIG_WRITETOFILE("// }}}\n")
// step 5: debug info
- print(sprintf("#%d: %s: %d settings...\n", i, W_Name(i), WEP_CONFIG_COUNT));
+ print(sprintf("#%d: %s: %d settings...\n", i, WEP_NAME(i), WEP_CONFIG_COUNT));
totalsettings += WEP_CONFIG_COUNT;
}
e.weapons = result;
}
-string W_Name(float weaponid) // WEAPONTODO: make into a macro
-{
- return (get_weaponinfo(weaponid)).message;
-}
-
#ifdef CSQC
.float GetAmmoFieldFromNum(float i)
{
string W_FixWeaponOrder_AllowIncomplete(string order);
string W_FixWeaponOrder_ForceComplete(string order);
void W_RandomWeapons(entity e, float n);
-string W_Name(float weaponid);
#ifdef CSQC
.float GetAmmoFieldFromNum(float i);
// other useful macros
#define WEP_ACTION(wpn,wrequest) (get_weaponinfo(wpn)).weapon_func(wrequest)
#define WEP_AMMO(wpn) ((get_weaponinfo(WEP_##wpn)).ammo_field)
+#define WEP_NAME(wpn) ((get_weaponinfo(wpn)).message)
// ======================
shotspeedupward *= g_weaponspeedfactor;
if (!shotspeed)
{
- dprint("bot_aim: WARNING: weapon ", W_Name(self.weapon), " shotspeed is zero!\n");
+ dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " shotspeed is zero!\n");
shotspeed = 1000000;
}
if (!maxshottime)
{
- dprint("bot_aim: WARNING: weapon ", W_Name(self.weapon), " maxshottime is zero!\n");
+ dprint("bot_aim: WARNING: weapon ", WEP_NAME(self.weapon), " maxshottime is zero!\n");
maxshottime = 1;
}
makevectors(self.v_angle);
float startitem_failed;
-string W_Name(float weaponid);
string W_Apply_Weaponreplace(string in);
void FixIntermissionClient(entity e);
void FixClientCvars(entity e);
+// WEAPONTODO: remove this
WepSet weaponsInMap;
.float respawn_countdown; // next number to count
wep = self.switchweapon;
if (!wep)
wep = self.cnt;
- replacement = W_Name(wep);
+ replacement = WEP_NAME(wep);
} else if (escape == "W") {
if (self.items & IT_SHELLS) replacement = "shells";
else if (self.items & IT_NAILS) replacement = "bullets";
if(IS_REAL_CLIENT(self) && self.reload_complain < time)
{
play2(self, "weapons/unavailable.wav");
- sprint(self, strcat("You don't have enough ammo to reload the ^2", W_Name(self.weapon), "\n"));
+ sprint(self, strcat("You don't have enough ammo to reload the ^2", WEP_NAME(self.weapon), "\n"));
self.reload_complain = time + 1;
}
// switch away if the amount of ammo is not enough to keep using this weapon