Some small fixups.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5979 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2021-07-18 01:28:34 +00:00
parent 0dc79f7f0a
commit 52b7a441e3
5 changed files with 14 additions and 3 deletions

View file

@ -5848,7 +5848,6 @@ static void PM_ConfirmSource(void *ctx, promptbutton_t button)
Cmd_ExecuteString("menu_download\n", RESTRICT_LOCAL); Cmd_ExecuteString("menu_download\n", RESTRICT_LOCAL);
} }
} }
#endif
//given a url, try to chop it down to just a hostname //given a url, try to chop it down to just a hostname
static const char *PrettyHostFromURL(const char *origurl) static const char *PrettyHostFromURL(const char *origurl)
@ -5883,6 +5882,7 @@ static const char *PrettyHostFromURL(const char *origurl)
return url; return url;
} }
#endif
qboolean PM_AreSourcesNew(qboolean doprompt) qboolean PM_AreSourcesNew(qboolean doprompt)
{ {

View file

@ -3564,7 +3564,9 @@ void Surf_DrawWorld (void)
currententity = &r_worldentity; currententity = &r_worldentity;
{ {
#ifdef THREADEDWORLD
int sc = r_temporalscenecache.ival; int sc = r_temporalscenecache.ival;
#endif
RSpeedRemark(); RSpeedRemark();
Surf_LightmapShift(currentmodel); Surf_LightmapShift(currentmodel);

View file

@ -542,7 +542,6 @@ qboolean Ruleset_FileLoaded(const char *filename, const qbyte *filedata, size_t
{ //usually called on worker threads { //usually called on worker threads
qbyte digest[20]; qbyte digest[20];
size_t i, j; size_t i, j;
unsigned int status;
if (ruleset_current && ruleset_current->filehashes) if (ruleset_current && ruleset_current->filehashes)
{ {
@ -574,6 +573,7 @@ qboolean Ruleset_FileLoaded(const char *filename, const qbyte *filedata, size_t
{ {
if (!strcmp(filename, modifiles[i].name) && (modifiles[i].flags & (cl.teamfortress?FMOD_TF:FMOD_DM))) if (!strcmp(filename, modifiles[i].name) && (modifiles[i].flags & (cl.teamfortress?FMOD_TF:FMOD_DM)))
{ {
unsigned int status;
CalcHash(&hash_sha1, digest, sizeof(digest), filedata, filesize); CalcHash(&hash_sha1, digest, sizeof(digest), filedata, filesize);
for (j = 0; j < modifiles[i].hashes; j++) for (j = 0; j < modifiles[i].hashes; j++)
@ -872,6 +872,7 @@ extrafilehash:
return rs; return rs;
} }
#ifdef HAVE_LEGACY
static ruleset_t *Ruleset_ParseInternal(const char *name, const char *file) static ruleset_t *Ruleset_ParseInternal(const char *name, const char *file)
{ {
ruleset_t *rs; ruleset_t *rs;
@ -881,6 +882,7 @@ static ruleset_t *Ruleset_ParseInternal(const char *name, const char *file)
Z_Free(lazy); Z_Free(lazy);
return rs; return rs;
} }
#endif
static int QDECL Ruleset_Read(const char *fname, qofs_t size, time_t mtime, void *parm, searchpathfuncs_t *spath) static int QDECL Ruleset_Read(const char *fname, qofs_t size, time_t mtime, void *parm, searchpathfuncs_t *spath)
{ {

View file

@ -23,6 +23,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifdef _WIN32 #ifdef _WIN32
#include "winquake.h" #include "winquake.h"
#endif #endif
#ifdef __GLIBC__
#include <malloc.h>
#endif
#define NOZONE #define NOZONE
@ -675,6 +678,10 @@ void Cache_Flush(void)
#ifdef HAVE_CLIENT #ifdef HAVE_CLIENT
Image_Purge(); Image_Purge();
#endif #endif
#ifdef __GLIBC__
malloc_trim(0);
#endif
} }
static void Hunk_Print_f (void) static void Hunk_Print_f (void)

View file

@ -2905,7 +2905,7 @@ void Font_InvalidateColour(vec4_t newcolour)
if (font_foretint[0] == newcolour[0] && font_foretint[1] == newcolour[1] && font_foretint[2] == newcolour[2] && font_foretint[3] == newcolour[3]) if (font_foretint[0] == newcolour[0] && font_foretint[1] == newcolour[1] && font_foretint[2] == newcolour[2] && font_foretint[3] == newcolour[3])
return; return;
if (font_colourmask & CON_NONCLEARBG) if ((font_colourmask & CON_NONCLEARBG) && font_foremesh.numindexes)
{ {
if (R2D_Flush) if (R2D_Flush)
R2D_Flush(); R2D_Flush();