From 4f2bec00bbae289af991fd0f44b934f87d2e09c7 Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Thu, 2 Jan 2014 19:15:44 -0500 Subject: [PATCH] Begin making weapon model specification part of REGISTER_WEAPON --- qcsrc/common/weapons/weapons.qc | 17 ++++++++++++----- qcsrc/common/weapons/weapons.qh | 11 ++++++++--- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/qcsrc/common/weapons/weapons.qc b/qcsrc/common/weapons/weapons.qc index 1341adac3..30f270df5 100644 --- a/qcsrc/common/weapons/weapons.qc +++ b/qcsrc/common/weapons/weapons.qc @@ -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; diff --git a/qcsrc/common/weapons/weapons.qh b/qcsrc/common/weapons/weapons.qh index ae5c9a998..825a03e2a 100644 --- a/qcsrc/common/weapons/weapons.qh +++ b/qcsrc/common/weapons/weapons.qh @@ -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 -- 2.39.2