]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
A slightly better way of sticking the camera above the ground. Still bad though,...
authorMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 31 Mar 2011 17:10:19 +0000 (20:10 +0300)
committerMircea Kitsune <sonichedgehog_hyperblast00@yahoo.com>
Thu, 31 Mar 2011 17:10:19 +0000 (20:10 +0300)
qcsrc/client/View.qc

index 03cbcf790d47272b36731ef977b519ebf06cd707..c0bf17c6101dd5866b07e9e454614fb7529ad485 100644 (file)
@@ -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)
                {