return;\r
}\r
self.nextthink = time;\r
-setattachment(self, self.owner.weaponentity.weaponentity, strcat("displaydigit_", ftos(self.cnt)));\r
- //dprint(strcat(ftos(self.cnt), " --------\n"));\r
+\r
+ if(gettagindex(self.owner.weaponentity, "weapon"))\r
+ setattachment(self, self.owner.weaponentity, "weapon");\r
+ else if(gettagindex(self.owner.weaponentity, "tag_weapon"))\r
+ setattachment(self, self.owner.weaponentity, "tag_weapon");\r
}\r
\r
-void W_DisplaySetup(entity own, float load_num, float load_scale, float ammo_num, float ammo_scale)\r
+void W_DisplaySetup(entity own, float load_num, float ammo_num)\r
{\r
float i;\r
for(i = 1; i <= load_num + ammo_num; i += 1)\r
{\r
- entity digit;\r
+ entity digit, e;\r
digit = spawn();\r
- //setmodel(digit, "models/weapons/w_displaydigit.md3");\r
- setmodel(digit, "models/items/g_h1.md3");\r
digit.owner = own;\r
- digit.weapon = own.weapon;\r
+ digit.weapon = own.switchweapon;\r
digit.cnt = i;\r
+ digit.movetype = MOVETYPE_FOLLOW;\r
+ e = get_weaponinfo(digit.weapon);\r
\r
if(i <= load_num)\r
{\r
// weapon load digit\r
digit.digit_type = 0;\r
- digit.scale = load_scale;\r
+ setmodel(digit, strcat("models/weapons/v_", e.netname, "_digit1-", ftos(i) , ".md3"));\r
}\r
else\r
{\r
// ammo count digit\r
digit.digit_type = 1;\r
- digit.scale = ammo_scale;\r
+ setmodel(digit, strcat("models/weapons/v_", e.netname, "_digit2-", ftos(i) , ".md3"));\r
}\r
-\r
digit.think = W_DisplayThink;\r
digit.nextthink = time;\r
- //digit.viewmodelforclient = own;\r
- //setattachment(digit, own.weaponentity.weaponentity, "");\r
-\r
- dprint(strcat(own.weaponentity.weaponentity.classname, " --------\n"));\r
}\r
}\r
\r
weapon_setup(WEP_GRABBER);\r
self.grabber_state &~= GRABBER_WAITING_FOR_RELEASE;\r
self.current_ammo = ammo_fuel;\r
- W_DisplaySetup(self, 2, 1, 3, 0.75);\r
+ W_DisplaySetup(self, 2, 3);\r
}\r
else if (req == WR_CHECKAMMO1)\r
{\r