From: MirceaKitsune Date: Sat, 11 Sep 2010 11:14:18 +0000 (+0300) Subject: Fix the view offset issues by handling the view offset properly. You won't have your... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=89597762397f6dfff9b23c3b6ff502b2f0fa7db7;p=voretournament%2Fvoretournament.git Fix the view offset issues by handling the view offset properly. You won't have your camera stuck in the ground when eating someone while crouching, or getting eaten while crouching. --- diff --git a/data/qcsrc/server/vore.qc b/data/qcsrc/server/vore.qc index 607b6650..e0ef601f 100644 --- a/data/qcsrc/server/vore.qc +++ b/data/qcsrc/server/vore.qc @@ -1,7 +1,7 @@ .float regurgitate_prepare; .float system_delay, swallow_delay, digest_button_delay_time, regurgitate_button_delay_time; .float complain_vore; -.float vore_oldmovetype, vore_oldsolid, vore_oldstomachload, vore_oldview_ofs_z; +.float vore_oldmovetype, vore_oldsolid, vore_oldstomachload; const float system_delay_time = 0.1; const float complain_delay_time = 1; @@ -110,7 +110,7 @@ void Vore_CameraEffect_Apply() else self.cameraeffect_current = self.cameraeffect_target; - self.view_ofs_z = self.vore_oldview_ofs_z / self.cameraeffect_current; + self.view_ofs_z = PL_VIEW_OFS_z / self.cameraeffect_current; } .float gurgle_oldstomachload; @@ -145,7 +145,6 @@ void Vore_Swallow(entity e) e.vore_oldmovetype = e.movetype; e.vore_oldsolid = e.solid; - e.vore_oldview_ofs_z = e.view_ofs_z; e.predator = self; setorigin(e, e.predator.origin); @@ -191,7 +190,7 @@ void Vore_Regurgitate(entity e) e.movetype = e.vore_oldmovetype; if(e.health > 0) // leave SOLID_NOT for dead bodies e.solid = e.vore_oldsolid; - e.view_ofs_z = e.vore_oldview_ofs_z; + e.view_ofs_z = PL_VIEW_OFS_z; e.alpha = default_player_alpha; // apply velocities