]> de.git.xonotic.org Git - voretournament/voretournament.git/commitdiff
Prevent an assignment to world
authorMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 1 Mar 2012 10:28:00 +0000 (12:28 +0200)
committerMirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 1 Mar 2012 10:28:00 +0000 (12:28 +0200)
data/qcsrc/server/cl_weaponsystem.qc
docs/TODO.txt

index 100c4f8f618e08f98f13e9368f2fc457d4265d78..26246b9e20af0d6042ad24343f28f842ddbac31f 100644 (file)
@@ -765,8 +765,11 @@ void CL_Weaponentity_Think()
                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
+               if(self.weaponentity != world) // prevents assignment to world\r
+               {\r
+                       self.weaponentity.scale = self.scale;\r
+                       self.weaponentity.origin = self.origin;\r
+               }\r
        }\r
 };\r
 \r
index 9a12412659f9a0940ae922f9065d3e0fe74da13c..e053376347b665b34e6b40f97153ea0c523e29e7 100644 (file)
 \r
 - 0.7: When a player sound has less volume because the player is in a belly, make sure that doesn't apply to neighboring prey, because they are there too\r
 \r
-- 0.7 BUG: Fix assignment to world.scale when there is no weapon model in hand\r
-\r
 - 0.7: I set a different horizontal and vertical view bobbing, but the menu sliders adjust both to the same value. Fix this somehow
\ No newline at end of file