Separate cvars for exterior and view weapon scaling
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 16:46:43 +0000 (19:46 +0300)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Mon, 2 May 2011 16:46:43 +0000 (19:46 +0300)
data/defaultVT.cfg
data/qcsrc/server/cl_weaponsystem.qc

index 7d519a3edee3f279b1464b3243ea128732058d56..8e9c1390ab90856978096eacfea67609354bf29b 100644 (file)
@@ -1549,8 +1549,9 @@ set g_vore_keepdeadprey 1 "If enabled, prey remains in the stomach after dying,
 \r
 set g_healthsize 100 "Players who are low on health shrink and become smaller, value specifies health at which the player has default size"\r
 set g_healthsize_movementfactor 0.5 "Amount by which player size affects jumping and running"\r
-set g_healthsize_weaponscalefactor 0.5 "Amount by which player size resizes the view weapon model"\r
-set g_healthsize_weaponscalefactor_viewmodel_pos 5 "Amount by which the view model is moved vertically based on player size"\r
+set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resizes the exterior weapon model"\r
+set g_healthsize_weapon_scalefactor 0.5 "Amount by which player size resizes the view weapon model"\r
+set g_healthsize_weapon_scalefactor_pos 5 "Amount by which the view model is moved vertically based on player size"\r
 set g_healthsize_min 25 "Player size may not drop below this amount of health"\r
 set g_healthsize_max 200 "Player size may not grow past this amount of health"\r
 \r
index 034b4fc7933e9a946ff41bb9613dd845e3b30be6..2b224bac5ad5d766c647f13522d74380289638e2 100644 (file)
@@ -739,10 +739,10 @@ void CL_Weaponentity_Think()
        // create or update the lasertarget entity\r
 \r
        // if we are a micro or macro, size the weapon model accordingly\r
-       if(self.owner.scale && cvar("g_healthsize_weaponscalefactor"))\r
+       if(self.owner.scale && cvar("g_healthsize_weapon_scalefactor"))\r
        {\r
-               self.weaponentity.scale = (1 + cvar("g_healthsize_weaponscalefactor")) - cvar("g_healthsize_weaponscalefactor") * self.owner.scale;\r
-               self.weaponentity.origin_z = (1 - self.weaponentity.scale) * cvar("g_healthsize_weaponscalefactor_viewmodel_pos");\r
+               self.weaponentity.scale = (1 + cvar("g_healthsize_weapon_scalefactor")) - cvar("g_healthsize_weapon_scalefactor") * self.owner.scale;\r
+               self.weaponentity.origin_z = (1 - self.weaponentity.scale) * cvar("g_healthsize_weapon_scalefactor_pos");\r
        }\r
 };\r
 \r
@@ -827,10 +827,10 @@ void CL_ExteriorWeaponentity_Think()
        }\r
 \r
        // if we are a micro or macro, size the weapon model accordingly\r
-       if(self.owner.scale && cvar("g_healthsize_weaponscalefactor"))\r
+       if(self.owner.scale && cvar("g_healthsize_exteriorweapon_scalefactor"))\r
        {\r
                self.scale = 1 / self.owner.scale; // for some reason, the exterior weapon entity copies the player's scale somewhere else, so undo that first\r
-               self.scale = (1 - cvar("g_healthsize_weaponscalefactor")) + cvar("g_healthsize_weaponscalefactor") * self.scale;\r
+               self.scale = (1 - cvar("g_healthsize_exteriorweapon_scalefactor")) + cvar("g_healthsize_exteriorweapon_scalefactor") * self.scale;\r
        }\r
 \r
        self.colormap = self.owner.colormap;\r