From afb903877a0d219164d80c8b7b09662f84b978a8 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 15 Aug 2017 15:43:16 +1000 Subject: [PATCH] Simplify target_give_init a bit --- qcsrc/server/compat/quake3.qc | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/qcsrc/server/compat/quake3.qc b/qcsrc/server/compat/quake3.qc index 532428dd08..2e2301d0bd 100644 --- a/qcsrc/server/compat/quake3.qc +++ b/qcsrc/server/compat/quake3.qc @@ -118,35 +118,23 @@ void target_give_init(entity this) { if (it.classname == "weapon_rocketlauncher" || it.classname == "weapon_devastator") { this.ammo_rockets += it.count * WEP_CVAR(devastator, ammo); - this.netname = "devastator"; + this.netname = cons(this.netname, "devastator"); } else if (it.classname == "weapon_lightning") { this.ammo_cells += it.count * WEP_CVAR_PRI(electro, ammo); // WEAPONTODO - if(this.netname == "") - this.netname = "electro"; - else - this.netname = strcat(this.netname, " electro"); + this.netname = cons(this.netname, "electro"); } else if (it.classname == "weapon_plasmagun") { this.ammo_rockets += it.count * WEP_CVAR_PRI(hagar, ammo); // WEAPONTODO - if(this.netname == "") - this.netname = "hagar"; - else - this.netname = strcat(this.netname, " hagar"); + this.netname = cons(this.netname, "hagar"); } else if (it.classname == "weapon_bfg") { this.ammo_cells += it.count * WEP_CVAR_PRI(crylink, ammo); - if(this.netname == "") - this.netname = "crylink"; - else - this.netname = strcat(this.netname, " crylink"); + this.netname = cons(this.netname, "crylink"); } else if (it.classname == "weapon_grenadelauncher" || it.classname == "weapon_mortar") { this.ammo_rockets += it.count * WEP_CVAR_PRI(mortar, ammo); // WEAPONTODO - if(this.netname == "") - this.netname = "mortar"; - else - this.netname = strcat(this.netname, " mortar"); + this.netname = cons(this.netname, "mortar"); } else if (it.classname == "item_armor_body") this.armorvalue = 100; -- 2.39.2