]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
add a workaround for Xonotic 0.1.0 "crouchbug"
authorRudolf Polzer <divverent@xonotic.org>
Fri, 1 Jul 2011 18:00:16 +0000 (20:00 +0200)
committerRudolf Polzer <divverent@xonotic.org>
Fri, 1 Jul 2011 18:00:16 +0000 (20:00 +0200)
qcsrc/client/View.qc
qcsrc/common/util-pre.qh
qcsrc/warpzonelib/client.qc

index 69f7f4676d3ecffda8f76f3c964570888b7e02f7..823f820441a3623b6f1c98e7c2f7f6fbcda63fb6 100644 (file)
@@ -549,8 +549,15 @@ void CSQC_UpdateView(float w, float h)
 
        // ALWAYS Clear Current Scene First
        R_ClearScene();
+#ifdef WORKAROUND_XON010
+       if(checkextension("DP_CSQC_ROTATEMOVES"))
+       {
+#endif
        R_SetView(VF_ORIGIN, view_origin);
        R_SetView(VF_ANGLES, view_angles);
+#ifdef WORKAROUND_XON010
+       }
+#endif
 
        // FIXME engine bug? VF_SIZE and VF_MIN are not restored to sensible values by this
        R_SetView(VF_SIZE, vf_size);
index bc086e4a9af392358db52715af04de0ae882f6bc..4e237bfb6179153ca1d3fae80d2faa534abc316a 100644 (file)
@@ -1,2 +1,4 @@
 #pragma flag enable subscope
 #pragma flag enable lo
+
+#define WORKAROUND_XON010
index d0e797448effce04ba99e24f69349b86a520e4aa..5979c804d2f01e3b52d42f2a653b149376db337d 100644 (file)
@@ -242,12 +242,19 @@ void WarpZone_FixView()
 
        org = R_SetView3fv(VF_ORIGIN);
        ang = R_SetView3fv(VF_ANGLES);
+#ifdef WORKAROUND_XON010
+       float dirty;
+       dirty = checkextension("DP_CSQC_ROTATEMOVES");
+#endif
 
        e = WarpZone_Find(org, org);
        if(e)
        {
                org = WarpZone_TransformOrigin(e, org);
                ang = WarpZone_TransformVAngles(e, ang);
+#ifdef WORKAROUND_XON010
+               dirty = 1;
+#endif
                WarpZone_View_Inside();
        }
        else
@@ -264,11 +271,22 @@ void WarpZone_FixView()
        rick *= f;
        R_SetView(VF_CL_VIEWANGLES_Z, rick);
 
+#ifdef WORKAROUND_XON010
+       if(ang_z > 1 || ang_z < -1)
+               dirty = 1;
+#endif
        ang_z *= f;
 #endif
 
+#ifdef WORKAROUND_XON010
+       if(dirty)
+       {
+#endif
        R_SetView(VF_ORIGIN, org);
        R_SetView(VF_ANGLES, ang);
+#ifdef WORKAROUND_XON010
+       }
+#endif
 
        nearclip = '0 0 1' * (cvar("r_nearclip") * 1.125);
        corner0 = cs_unproject('0 0 0' + nearclip);