From: MirceaKitsune Date: Mon, 2 May 2011 20:35:28 +0000 (+0300) Subject: Do update health-based scale for prey, just not the view offset X-Git-Url: http://de.git.xonotic.org/?p=voretournament%2Fvoretournament.git;a=commitdiff_plain;h=ce6c8d4a548de7fcd5818f17f0d433edade16a19 Do update health-based scale for prey, just not the view offset --- diff --git a/data/qcsrc/server/cl_client.qc b/data/qcsrc/server/cl_client.qc index 25c9eb6e..7bab8694 100644 --- a/data/qcsrc/server/cl_client.qc +++ b/data/qcsrc/server/cl_client.qc @@ -2253,24 +2253,23 @@ void ApplyHealthSize() if not(cvar("g_healthsize")) return; - if not(self.predator.classname == "player" || self.fakeprey) - { self.scale = bound(cvar("g_healthsize_min"), self.health, cvar("g_healthsize_max")) / cvar("g_healthsize"); - // The following code sets the bounding box to match the player's size. - // It is currently disabled because of issues with engine movement prediction (cl_movement). - // The engine expects the bounding box to be default size, and changing it will cause glitches. - // This code may be enabled once the engine has the ability to use different bbox sizes for movement prediction. - if(self.crouch) - { - //setsize (self, PL_CROUCH_MIN * self.scale, PL_CROUCH_MAX * self.scale); + // The following code sets the bounding box to match the player's size. + // It is currently disabled because of issues with engine movement prediction (cl_movement). + // The engine expects the bounding box to be default size, and changing it will cause glitches. + // This code may be enabled once the engine has the ability to use different bbox sizes for movement prediction. + if(self.crouch) + { + //setsize (self, PL_CROUCH_MIN * self.scale, PL_CROUCH_MAX * self.scale); + if not(self.predator.classname == "player" || self.fakeprey) self.view_ofs = PL_CROUCH_VIEW_OFS * self.scale; - } - else - { - //setsize (self, PL_MIN * self.scale, PL_MAX * self.scale); + } + else + { + //setsize (self, PL_MIN * self.scale, PL_MAX * self.scale); + if not(self.predator.classname == "player" || self.fakeprey) self.view_ofs = PL_VIEW_OFS * self.scale; - } } }