]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fake answers for R_GetFragmentLocation when running dedicated
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Jan 2002 05:34:21 +0000 (05:34 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 22 Jan 2002 05:34:21 +0000 (05:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1383 d7cf8633-e32d-0410-b094-e92efae38249

gl_textures.c

index fb0c0ae599a6e5e81dddc23f91ac63409ec9b801..f62a0cb0f729319ddc995e8dddcd0626af60cae2 100644 (file)
@@ -1456,6 +1456,25 @@ void R_GetFragmentLocation(rtexture_t *rt, int *x, int *y, float *fx1, float *fy
 {
        gltexture_t *glt;
        float iwidth, iheight;
+       if (cls.state == ca_dedicated)
+       {
+               if (x)
+                       *x = 0;
+               if (y)
+                       *y = 0;
+               if (fx1 || fy1 || fx2 || fy2)
+               {
+                       if (fx1)
+                               *fx1 = 0;
+                       if (fy1)
+                               *fy1 = 0;
+                       if (fx2)
+                               *fx2 = 1;
+                       if (fy2)
+                               *fy2 = 1;
+               }
+               return;
+       }
        if (!rt)
                Host_Error("R_GetFragmentLocation: no texture supplied\n");
        glt = (gltexture_t *)rt;