From c77897290c86c7bddd5112568825c3ff22ad2920 Mon Sep 17 00:00:00 2001 From: div0 Date: Mon, 21 Jul 2008 15:52:25 +0000 Subject: [PATCH] Argh... use the RIGHT variable, whichpack then works better git-svn-id: svn://svn.icculus.org/nexuiz/trunk@3870 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/g_world.qc | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index 28910acf8..f9c8994f6 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -2085,7 +2085,7 @@ float MapVote_GetMapMask() void MapVote_SendData(float targ) { - string mapfile; + string mapfile, pakfile; float i, o; WriteByte(targ, SVC_TEMPENTITY); WriteByte(targ, TE_CSQC_CONFIG); @@ -2109,14 +2109,15 @@ void MapVote_SendData(float targ) { WriteString(targ, mapvote_maps[i]); mapfile = strcat(mapvote_screenshot_dir, "/", mapvote_maps[i]); - mapfile = whichpack(strcat(mapfile, ".tga")); - if(mapfile == "") - mapfile = whichpack(strcat(mapfile, ".jpg")); - if(mapfile == "") - mapfile = whichpack(strcat(mapfile, ".png")); - for(o = strstr(mapfile, "/", 0)+1; o > 0; o = strstr(mapfile, "/", 0)+1) - mapfile = substring(mapfile, o, 999); - WriteString(targ, mapfile); + pakfile = whichpack(strcat(mapfile, ".tga")); + if(pakfile == "") + pakfile = whichpack(strcat(mapfile, ".jpg")); + if(pakfile == "") + pakfile = whichpack(strcat(mapfile, ".png")); + print("pakfile is ", pakfile, "\n"); + for(o = strstr(pakfile, "/", 0)+1; o > 0; o = strstr(pakfile, "/", 0)+1) + pakfile = substring(pakfile, o, 999); + WriteString(targ, pakfile); } } -- 2.39.2