From: Samual Lenks Date: Fri, 3 Jan 2014 00:05:31 +0000 (-0500) Subject: Rename our usage of model2 to wpmodel X-Git-Tag: xonotic-v0.8.0~152^2~153 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1378adc3b4a9f910a506575b1f0ef0bca43972df;p=xonotic%2Fxonotic-data.pk3dir.git Rename our usage of model2 to wpmodel --- diff --git a/qcsrc/common/weapons/weapons.qc b/qcsrc/common/weapons/weapons.qc index c0033cb82..1341adac3 100644 --- a/qcsrc/common/weapons/weapons.qc +++ b/qcsrc/common/weapons/weapons.qc @@ -99,12 +99,12 @@ void register_weapon( e.spawnflags = weapontype; e.bot_pickupbasevalue = pickupbasevalue; e.wpcolor = clr; + e.wpmodel = strzone(strcat("wpn-", ftos(id))); e.mdl = modelname; e.model = strzone(strcat("models/weapons/g_", modelname, ".md3")); e.w_crosshair = strzone(car(crosshair)); string s = cdr(crosshair); 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 = refname; e.message = wepname; diff --git a/qcsrc/common/weapons/weapons.qh b/qcsrc/common/weapons/weapons.qh index ca16f654a..ae5c9a998 100644 --- a/qcsrc/common/weapons/weapons.qh +++ b/qcsrc/common/weapons/weapons.qh @@ -155,7 +155,7 @@ void register_weapons_done(); .float spawnflags; // M: flags // WEPSPAWNFLAG_... combined .float bot_pickupbasevalue; // M: rating // bot weapon priority .vector wpcolor; // M: color // waypointsprite color -.string model2; // A: wpn-id // wpn- sprite name +.string wpmodel; // A: wpn-id // wpn- sprite name .string mdl; // M: model // modelname without g_, v_, w_ .string model; // A: model // full name of g_ model .string w_crosshair; // M: crosshair // per-weapon crosshair: "CrosshairImage Size" diff --git a/qcsrc/server/weapons/selection.qc b/qcsrc/server/weapons/selection.qc index cb4159f13..482b3180a 100644 --- a/qcsrc/server/weapons/selection.qc +++ b/qcsrc/server/weapons/selection.qc @@ -75,10 +75,6 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) if(autocvar_g_showweaponspawns) { entity e; - string s; - - e = get_weaponinfo(wpn); - s = e.model2; for(e = world; (e = findfloat(e, weapon, wpn)); ) { @@ -87,7 +83,7 @@ float client_hasweapon(entity cl, float wpn, float andammo, float complain) if(!(e.flags & FL_ITEM)) continue; WaypointSprite_Spawn( - s, + (get_weaponinfo(wpn)).wpmodel, 1, 0, world, e.origin, self, 0,