]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Begin making weapon model specification part of REGISTER_WEAPON
authorSamual Lenks <samual@xonotic.org>
Fri, 3 Jan 2014 00:15:44 +0000 (19:15 -0500)
committerSamual Lenks <samual@xonotic.org>
Fri, 3 Jan 2014 00:15:44 +0000 (19:15 -0500)
qcsrc/common/weapons/weapons.qc
qcsrc/common/weapons/weapons.qh

index 1341adac361924b17e3cc30771301520682811ae..30f270df53a83e61856329dfd33f7232742ead1d 100644 (file)
@@ -83,7 +83,10 @@ void register_weapon(
        float weapontype,
        float pickupbasevalue,
        vector clr,
-       string modelname,
+       string firstmodel,
+       string thirdmodel,
+       string pickupmodel,
+       string simplemodel,
        string crosshair,
        string refname,
        string wepname)
@@ -100,8 +103,10 @@ void register_weapon(
        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.model = strzone(firstmodel); // first person view weapon model (h_)
+       e.model2 = strzone(thirdmodel); // third person weapon model (v_)
+       e.model3 = strzone(pickupmodel); // pickup weapon model (g_)
+       e.mdl = strzone(simplemodel); // simpleitems weapon model/image
        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)
@@ -125,10 +130,12 @@ void register_weapons_done()
        dummy_weapon_info.netname = "";
        dummy_weapon_info.message = "AOL CD Thrower";
        dummy_weapon_info.weapon_func = w_null;
-       dummy_weapon_info.mdl = "";
+       dummy_weapon_info.wpmodel = "";
        dummy_weapon_info.model = "";
-       dummy_weapon_info.spawnflags = 0;
        dummy_weapon_info.model2 = "";
+       dummy_weapon_info.model3 = "";
+       dummy_weapon_info.mdl = "";
+       dummy_weapon_info.spawnflags = 0;
        dummy_weapon_info.impulse = -1;
        dummy_weapon_info.bot_pickupbasevalue = 0;
        dummy_weapon_info.ammo_field = ammo_none;
index ae5c9a99817429cf0667e37c68779063e4c26d3e..825a03e2ac81131e635e9d37e0b43f6fbeb342ad 100644 (file)
@@ -138,7 +138,10 @@ void register_weapon(
        float weapontype,
        float pickupbasevalue,
        vector clr,
-       string modelname,
+       string firstmodel,
+       string thirdmodel,
+       string pickupmodel,
+       string simplemodel,
        string crosshair,
        string refname,
        string wepname);
@@ -156,8 +159,10 @@ void register_weapons_done();
 .float bot_pickupbasevalue; // M: rating     // bot weapon priority
 .vector wpcolor;            // M: color      // waypointsprite color
 .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 model;              // M: firstmodel  // first person view weapon model (h_)
+.string model2;             // M: thirdmodel  // third person weapon model (v_)
+.string model3;             // M: pickupmodel // pickup weapon model (g_)
+.string mdl;                // M: simplemodel // simpleitems weapon model/image
 .string w_crosshair;        // M: crosshair  // per-weapon crosshair: "CrosshairImage Size"
 .float w_crosshair_size;    // A: crosshair  // per-weapon crosshair size (argument two of "crosshair" field)
 .string netname;            // M: refname    // reference name name