]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - image.c
fix bug in last patch - must set trace.endpos AFTER calling TracePoint
[xonotic/darkplaces.git] / image.c
diff --git a/image.c b/image.c
index 6bca15aa45ae45a73179c278d5e657b07b3524c7..d5123408c96141dd56849b2e5b29bc0321c53407 100644 (file)
--- a/image.c
+++ b/image.c
@@ -849,6 +849,10 @@ unsigned char *loadimagepixelsbgra (const char *filename, qboolean complain, qbo
                        Con_Printf(format == firstformat ? "\"%s\"" : (format[1].formatstring ? ", \"%s\"" : " or \"%s\".\n"), format->formatstring);
                }
        }
+
+       // texture loading can take a while, so make sure we're sending keepalives
+       CL_KeepaliveMessage(false);
+
        if (developer_memorydebug.integer)
                Mem_CheckSentinelsGlobal();
        return NULL;
@@ -873,7 +877,7 @@ int fixtransparentpixels(unsigned char *data, int w, int h)
        int const FIXTRANS_HAS_U = 8;
        int const FIXTRANS_HAS_D = 16;
        int const FIXTRANS_FIXED = 32;
-       unsigned char *fixMask = Mem_Alloc(tempmempool, w * h);
+       unsigned char *fixMask = (unsigned char *) Mem_Alloc(tempmempool, w * h);
        int fixPixels = 0;
        int changedPixels = 0;
        int x, y;
@@ -1017,6 +1021,7 @@ void Image_FixTransparentPixels_f(void)
                        Con_Printf("unchanged.\n");
                Mem_Free(data);
        }
+       FS_FreeSearch(search);
 }
 
 qboolean Image_WriteTGABGR_preflipped (const char *filename, int width, int height, const unsigned char *data, unsigned char *buffer)