From 6b8fac1fa46bbf9412932d37889ce6879cd427af Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 5 Apr 2006 21:52:22 +0000 Subject: [PATCH] Fixes deathmatch/map caching for loc files (still needs 'deathmatch' set to load locs automagically). git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2164 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/client/zqtp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/client/zqtp.c b/engine/client/zqtp.c index 090d18442..30b4fbf0d 100644 --- a/engine/client/zqtp.c +++ b/engine/client/zqtp.c @@ -1910,11 +1910,15 @@ void TP_NewMap (void) if (strcmp(host_mapname.string, last_map)) { // map name has changed loc_numentries = 0; // clear loc file - if (tp_loadlocs.value && cl.deathmatch && !cls.demoplayback) { + if (tp_loadlocs.value && cl.deathmatch && !cls.demoplayback) + { Q_snprintfz (locname, sizeof(locname), "%s.loc", host_mapname.string); TP_LoadLocFile (locname, true); + + strlcpy (last_map, host_mapname.string, sizeof(last_map)); } - strlcpy (last_map, host_mapname.string, sizeof(last_map)); + else + strlcpy (last_map, "", sizeof(last_map)); } TP_ExecTrigger ("f_newmap");