From 70a5a2eb89c22d77b711de3c11a9c533d87e7941 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Thu, 2 Jan 2014 16:49:12 -0500 Subject: [PATCH] Reorganize the register_weapon function a little bit --- qcsrc/common/weapons/weapons.qc | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/qcsrc/common/weapons/weapons.qc b/qcsrc/common/weapons/weapons.qc index 97dda801b..b7ecf1c73 100644 --- a/qcsrc/common/weapons/weapons.qc +++ b/qcsrc/common/weapons/weapons.qc @@ -93,25 +93,20 @@ void register_weapon( e.classname = "weapon_info"; e.weapon = id; e.weapons = bit; - e.netname = shortname; - e.message = wname; e.weapon_func = func; + e.ammo_field = ammotype; + e.impulse = i; + e.spawnflags = weapontype; + e.bot_pickupbasevalue = pickupbasevalue; e.wpcolor = clr; e.mdl = modelname; e.model = strzone(strcat("models/weapons/g_", modelname, ".md3")); - e.spawnflags = weapontype; - e.model2 = strzone(strcat("wpn-", ftos(id))); - e.impulse = i; - e.bot_pickupbasevalue = pickupbasevalue; - e.ammo_field = ammotype; - - // WEAPONTODO: reorganize this - e.w_crosshair = strzone(car(crosshair)); string s = cdr(crosshair); - e.w_crosshair_size = ((s != "") ? stof(s) : 1); - - printf("wtf: '%s', '%s', %f.\n", car(crosshair), s, e.w_crosshair_size); + e.w_crosshair_size = ((s != "") ? stof(s) : 1); // so that we can scale the crosshair from code (for compat) + e.model2 = strzone(strcat("wpn-", ftos(id))); + e.netname = shortname; + e.message = wname; #ifndef MENUQC func(WR_INIT); -- 2.39.2