]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Make display digits use the proper weapon model, as well as the healthsize scaling...
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 1 Feb 2012 11:25:57 +0000 (13:25 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Wed, 1 Feb 2012 11:25:57 +0000 (13:25 +0200)
data/defaultVT.cfg
data/qcsrc/server/cl_weaponsystem.qc
docs/TODO.txt

index ab32f8e3fcdcfc29622d153250e31b2ad03870ad..de559885fae416df6958fca2681290c66e7e3c8f 100644 (file)
@@ -1657,7 +1657,7 @@ set g_healthsize_viewfactor 2 "The view is offset by this amount based on player
 set g_healthsize_soundfactor 0.5 "The sounds players make are amplified or reduced by this amount based on their size"\r
 set g_healthsize_exteriorweapon_scalefactor 1 "Amount by which player size resizes the exterior weapon model"\r
 set g_healthsize_weapon_scalefactor 1 "Amount by which player size resizes the view weapon model"\r
-set g_healthsize_weapon_scalefactor_pos 10 "Amount by which the view model is moved vertically based on player size"\r
+set g_healthsize_weapon_scalefactor_pos 4 "Amount by which the view model is moved vertically based on player size"\r
 \r
 set g_power 5 "when armor is below this level, the HUD, crosshair and helper will not work"\r
 set g_power_reboot 2 "amount of time it takes to boot a player's subsystems once he has enough armor"\r
index 85d65d47022c1e3d1e42e427e4f54b3f46e9c427..e9e06ec057816b8332921cccdc75d4274a17f1c5 100644 (file)
@@ -759,10 +759,14 @@ void CL_Weaponentity_Think()
        if(cvar("g_healthsize") && cvar("g_healthsize_weapon_scalefactor"))\r
        if(self.model != "")\r
        {\r
-               self.weaponentity.scale = (1 + cvar("g_healthsize_weapon_scalefactor")) - cvar("g_healthsize_weapon_scalefactor") * self.owner.scale;\r
-               if(self.weaponentity.scale < 0.1)\r
-                       self.weaponentity.scale = 0.1; // stuff breaks if scale is smaller than this\r
-               self.weaponentity.origin_z = (1 - self.weaponentity.scale) * cvar("g_healthsize_weapon_scalefactor_pos");\r
+               self.scale = (1 + cvar("g_healthsize_weapon_scalefactor")) - cvar("g_healthsize_weapon_scalefactor") * self.owner.scale;\r
+               if(self.scale < 0.1)\r
+                       self.scale = 0.1; // stuff breaks if scale is smaller than this\r
+               self.origin_z = (1 - self.scale) * cvar("g_healthsize_weapon_scalefactor_pos");\r
+\r
+               // copy properties to the static weapon entity as well\r
+               self.weaponentity.scale = self.scale;\r
+               self.weaponentity.origin = self.origin;\r
        }\r
 };\r
 \r
@@ -1610,7 +1614,7 @@ void W_DisplayDigitThink()
                        setattachment(self, self.owner.weaponentity, "weapon");\r
                else if(gettagindex(self.owner.weaponentity, "tag_weapon"))\r
                        setattachment(self, self.owner.weaponentity, "tag_weapon");\r
-               gun = self.owner.weaponentity.weaponentity;\r
+               gun = self.owner.weaponentity;\r
        }\r
 \r
        // copy all properties of the weapon to the digit\r
index 76fc023a4fa97a2325f2ca73606cffbce7cf4df0..7a7a7e94ec7600c6dd42acaf203a504da065234e 100644 (file)
 \r
 - 0.7 BUG: Default player model is broken?\r
 \r
-- 0.7 BUG: Display digits on th 1st persom model disappear when the next map starts.\r
-\r
 - 0.7 BUG: With the latest engine, the view is no longer locked after match end, and you can still look around. See what changed in Xonotic and how to fix this.\r
 \r
 - 0.7 BUG: Consumable health seems to give more than the health it should.\r