From: Samual Lenks Date: Thu, 2 Jan 2014 21:49:12 +0000 (-0500) Subject: Reorganize the register_weapon function a little bit X-Git-Tag: xonotic-v0.8.0~152^2~157 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=70a5a2eb89c22d77b711de3c11a9c533d87e7941;p=xonotic%2Fxonotic-data.pk3dir.git Reorganize the register_weapon function a little bit --- diff --git a/qcsrc/common/weapons/weapons.qc b/qcsrc/common/weapons/weapons.qc index 97dda801b0..b7ecf1c739 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);