From: Mircea Kitsune Date: Thu, 31 Mar 2011 17:10:19 +0000 (+0300) Subject: A slightly better way of sticking the camera above the ground. Still bad though,... X-Git-Tag: xonotic-v0.5.0~268^2^2~23 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a4dfa7b527983e408daf76f1b95b3265132cf18a;p=xonotic%2Fxonotic-data.pk3dir.git A slightly better way of sticking the camera above the ground. Still bad though, need to figure the correct maths --- diff --git a/qcsrc/client/View.qc b/qcsrc/client/View.qc index 03cbcf790..c0bf17c61 100644 --- a/qcsrc/client/View.qc +++ b/qcsrc/client/View.qc @@ -367,6 +367,7 @@ float contentavgalpha, liquidalpha_prev; vector liquidcolor_prev; float chase_current_distance; +vector chase_old_origin; void CSQC_UpdateView(float w, float h) { @@ -428,9 +429,12 @@ void CSQC_UpdateView(float w, float h) // don't allow the camera to go through walls traceline(pmove_org, chase_target_origin, MOVE_NORMAL, self); if(trace_fraction == 1) + { R_SetView(VF_ORIGIN, chase_target_origin); + chase_old_origin = chase_target_origin; + } else - R_SetView(VF_ORIGIN, pmove_org); + R_SetView(VF_ORIGIN, chase_old_origin); } else if(autocvar_chase_active < 0) {