]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cl_screen.c
more q3bsp work (and no it still doesn't work right)
[xonotic/darkplaces.git] / cl_screen.c
index 39d257d56623eb8bf2b9f7d5b44842c6df1d3523..f90470f1afd102caebcc6067b3330f5474a0b7ee 100644 (file)
@@ -2,6 +2,7 @@
 #include "quakedef.h"
 #include "cl_video.h"
 #include "jpeg.h"
+#include "cl_collision.h"
 
 cvar_t scr_viewsize = {CVAR_SAVE, "viewsize","100"};
 cvar_t scr_fov = {CVAR_SAVE, "fov","90"};      // 10 - 170
@@ -697,8 +698,8 @@ static void SCR_CalcRefdef (void)
        if (cl.worldmodel)
        {
                Mod_CheckLoaded(cl.worldmodel);
-               contents = cl.worldmodel ? cl.worldmodel->PointContents(cl.worldmodel, r_refdef.vieworg) : CONTENTS_EMPTY;
-               if (contents != CONTENTS_EMPTY && contents != CONTENTS_SOLID)
+               contents = CL_PointSuperContents(r_refdef.vieworg);
+               if (contents & SUPERCONTENTS_LIQUIDSMASK)
                {
                        r_refdef.fov_x *= (sin(cl.time * 4.7) * 0.015 + 0.985);
                        r_refdef.fov_y *= (sin(cl.time * 3.0) * 0.015 + 0.985);
@@ -749,8 +750,14 @@ static int cl_avidemo_frame = 0;
 void SCR_CaptureAVIDemo(void)
 {
        char filename[32];
-       sprintf(filename, "dpavi%06d.tga", cl_avidemo_frame);
-       if (SCR_ScreenShot(filename, vid.realx, vid.realy, vid.realwidth, vid.realheight, false))
+       qboolean jpeg = (scr_screenshot_jpeg.integer != 0);
+
+       if (jpeg)
+               sprintf(filename, "dpavi%06d.jpg", cl_avidemo_frame);
+       else
+               sprintf(filename, "dpavi%06d.tga", cl_avidemo_frame);
+
+       if (SCR_ScreenShot(filename, vid.realx, vid.realy, vid.realwidth, vid.realheight, jpeg))
                cl_avidemo_frame++;
        else
        {
@@ -965,9 +972,6 @@ void CL_UpdateScreen(void)
 
        DrawQ_Clear();
 
-       V_UpdateBlends();
-       V_CalcRefdef ();
-
        if (cls.signon == SIGNONS)
                R_TimeReport("setup");