From 4029231ac3443364b2a5bdf795d6caa382f2649a Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 27 Nov 2014 17:26:58 +1100 Subject: [PATCH] Add rough support to target_give for the new weapon names, fix 2 issues with compatibility aliases --- qcsrc/server/t_quake3.qc | 14 +++++++------- weapons.cfg | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/qcsrc/server/t_quake3.qc b/qcsrc/server/t_quake3.qc index 30f1e8f8d..7c1a58287 100644 --- a/qcsrc/server/t_quake3.qc +++ b/qcsrc/server/t_quake3.qc @@ -70,9 +70,9 @@ void target_give_init() { entity targ; for (targ = world; (targ = find(targ, targetname, self.target)); ) { - if (targ.classname == "weapon_rocketlauncher") { + if (targ.classname == "weapon_rocketlauncher" || targ.classname == "weapon_devastator") { self.ammo_rockets += targ.count * WEP_CVAR(devastator, ammo); - self.netname = "rocketlauncher"; + self.netname = "devastator"; } else if (targ.classname == "weapon_plasmagun") { self.ammo_rockets += targ.count * WEP_CVAR_PRI(hagar, ammo); // WEAPONTODO @@ -82,18 +82,18 @@ void target_give_init() self.netname = strcat(self.netname, " hagar"); } else if (targ.classname == "weapon_bfg") { - self.ammo_cells += targ.count * autocvar_g_balance_crylink_primary_ammo; + self.ammo_cells += targ.count * WEP_CVAR_PRI(crylink, ammo); if(self.netname == "") self.netname = "crylink"; else self.netname = strcat(self.netname, " crylink"); } - else if (targ.classname == "weapon_grenadelauncher") { - self.ammo_rockets += targ.count * autocvar_g_balance_mortar_primary_ammo; // WEAPONTODO + else if (targ.classname == "weapon_grenadelauncher" || targ.classname == "weapon_mortar") { + self.ammo_rockets += targ.count * WEP_CVAR_PRI(mortar, ammo); // WEAPONTODO if(self.netname == "") - self.netname = "grenadelauncher"; + self.netname = "mortar"; else - self.netname = strcat(self.netname, " grenadelauncher"); + self.netname = strcat(self.netname, " mortar"); } else if (targ.classname == "item_armor_body") self.armorvalue = 100; diff --git a/weapons.cfg b/weapons.cfg index 95b9ddf51..eb768df23 100644 --- a/weapons.cfg +++ b/weapons.cfg @@ -22,7 +22,7 @@ alias weapon_arc "impulse 249" // Backwards compatibility with 0.7.0 alias weapon_laser "weapon_blaster" alias weapon_uzi "weapon_machinegun" -alias weapon_grenadelauncher "weapon_grenadelauncher" +alias weapon_grenadelauncher "weapon_mortar" alias weapon_nex "weapon_vortex" -alias weapon_rocketlauncher "weapon_devestator" +alias weapon_rocketlauncher "weapon_devastator" alias weapon_minstanex "weapon_vaporizer" -- 2.39.2