From a2d6945b2ea0923ce26b9e566401f6a12d6892b9 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Thu, 1 Mar 2012 12:28:00 +0200 Subject: [PATCH] Prevent an assignment to world --- data/qcsrc/server/cl_weaponsystem.qc | 7 +++++-- docs/TODO.txt | 2 -- 2 files changed, 5 insertions(+), 4 deletions(-) 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 -- 2.39.2