]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Rename our usage of model2 to wpmodel
authorSamual Lenks <samual@xonotic.org>
Fri, 3 Jan 2014 00:05:31 +0000 (19:05 -0500)
committerSamual Lenks <samual@xonotic.org>
Fri, 3 Jan 2014 00:05:31 +0000 (19:05 -0500)
qcsrc/common/weapons/weapons.qc
qcsrc/common/weapons/weapons.qh
qcsrc/server/weapons/selection.qc

index c0033cb8254af026abb8013a854878636bb59fdd..1341adac361924b17e3cc30771301520682811ae 100644 (file)
@@ -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;
 
index ca16f654acb24b74fcbbe7d9cbd6b067e8df28fe..ae5c9a99817429cf0667e37c68779063e4c26d3e 100644 (file)
@@ -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"
index cb4159f139fa51bf6a7e4a40fb9365a655665719..482b3180a0078222670860bf9fcb2eec018b509a 100644 (file)
@@ -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,