From: MirceaKitsune Date: Thu, 1 Mar 2012 10:28:00 +0000 (+0200) Subject: Prevent an assignment to world X-Git-Url: http://de.git.xonotic.org/?a=commitdiff_plain;h=a2d6945b2ea0923ce26b9e566401f6a12d6892b9;p=voretournament%2Fvoretournament.git Prevent an assignment to world --- diff --git a/data/qcsrc/server/cl_weaponsystem.qc b/data/qcsrc/server/cl_weaponsystem.qc index 100c4f8f..26246b9e 100644 --- a/data/qcsrc/server/cl_weaponsystem.qc +++ b/data/qcsrc/server/cl_weaponsystem.qc @@ -765,8 +765,11 @@ void CL_Weaponentity_Think() self.origin_z = (1 - self.scale) * cvar("g_healthsize_weapon_scalefactor_pos"); // copy properties to the static weapon entity as well - self.weaponentity.scale = self.scale; - self.weaponentity.origin = self.origin; + if(self.weaponentity != world) // prevents assignment to world + { + self.weaponentity.scale = self.scale; + self.weaponentity.origin = self.origin; + } } }; diff --git a/docs/TODO.txt b/docs/TODO.txt index 9a124126..e0533763 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -128,6 +128,4 @@ - 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 -- 0.7 BUG: Fix assignment to world.scale when there is no weapon model in hand - - 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