]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add rough support to target_give for the new weapon names, fix 2 issues with compatib...
authorMario <zacjardine@y7mail.com>
Thu, 27 Nov 2014 06:26:58 +0000 (17:26 +1100)
committerMario <zacjardine@y7mail.com>
Thu, 27 Nov 2014 06:26:58 +0000 (17:26 +1100)
qcsrc/server/t_quake3.qc
weapons.cfg

index 30f1e8f8df5abbcd6d485f3cd2e99d16aa8347ad..7c1a582879ea5f3a64cc68de0869c075994df2ae 100644 (file)
@@ -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;
index 95b9ddf51653ee7403bc74bf29e4a5df725453a9..eb768df231f9023827cbffe4b55c681c366cedbd 100644 (file)
@@ -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"