]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/View.qc
slightly better music state handling
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / View.qc
index 9bb7661430b215c4de41cfdd67884efd8c493e7e..afa884df1ea055a8a1c578d16243e5f3811b9431 100644 (file)
@@ -343,6 +343,8 @@ string NextFrameCommand;
 void CSQC_SPIDER_HUD();
 void CSQC_RAPTOR_HUD();
 
+vector freeze_pmove_org, freeze_input_angles;
+
 void CSQC_UpdateView(float w, float h)
 {
        entity e;
@@ -366,6 +368,17 @@ void CSQC_UpdateView(float w, float h)
        pmove_org = warpzone_fixview_origin - vo;
        input_angles = warpzone_fixview_angles;
 
+       if(cvar("cl_lockview"))
+       {
+               pmove_org = warpzone_fixview_origin = freeze_pmove_org;
+               input_angles = freeze_input_angles;
+               R_SetView(VF_ORIGIN, pmove_org + vo);
+               R_SetView(VF_ANGLES, input_angles);
+               //R_SetView(VF_CL_VIEWANGLES, input_angles);
+       }
+       freeze_pmove_org = pmove_org;
+       freeze_input_angles = input_angles;
+
        // Render the Scene
        if(!intermission || !view_set)
        {
@@ -400,6 +413,7 @@ void CSQC_UpdateView(float w, float h)
        }
 #endif
 
+       TargetMusic_Advance();
        Fog_Force();
 
        drawframetime = max(0.000001, time - drawtime);