r6089 - in branches/nexuiz-2.0: . data/qcsrc/client data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Mar 9 09:26:08 EDT 2009
Author: div0
Date: 2009-03-09 09:26:07 -0400 (Mon, 09 Mar 2009)
New Revision: 6089
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc
branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
r6087 | div0 | 2009-03-09 13:23:05 +0100 (Mon, 09 Mar 2009) | 2 lines
try to fix the "don't care" message spam
r6088 | div0 | 2009-03-09 14:20:21 +0100 (Mon, 09 Mar 2009) | 2 lines
show "1 vote" instead of "1 votes"
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-03-09 13:20:21 UTC (rev 6088)
+++ branches/nexuiz-2.0/.patchsets 2009-03-09 13:26:07 UTC (rev 6089)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6039,6044-6085
+revisions_applied = 1-6039,6044-6088
Modified: branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc 2009-03-09 13:20:21 UTC (rev 6088)
+++ branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc 2009-03-09 13:26:07 UTC (rev 6089)
@@ -18,7 +18,12 @@
string pre, post;
pre = strcat(ftos(id+1), ". ");
if(mv_detail)
- post = strcat(" (", ftos(count), " votes)");
+ {
+ if(count == 1)
+ post = strcat(" (1 vote)");
+ else
+ post = strcat(" (", ftos(count), " votes)");
+ }
else
post = "";
maxwidth -= stringwidth(pre, FALSE) + stringwidth(post, FALSE);
@@ -241,7 +246,7 @@
pak.chain = mv_pk3list;
mv_pk3list = pak;
- if(pk3 != "" && pk3 != "don't care") // TODO make this less stupid, but I am lazy now
+ if(pk3 != "")
{
localcmd(strcat("\ncurl --pak ", pk3, "; wait; cl_cmd mv_download ", ftos(id), "\n"));
}
@@ -253,6 +258,10 @@
void MapVote_CheckPic(string pic, string pk3, float id)
{
+ // never try to retrieve a pic for the "don't care" 'map'
+ if(mv_abstain && id == mv_num_maps - 1)
+ return;
+
if(PreviewExists(pic))
{
mv_preview[id] = true;
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-03-09 13:20:21 UTC (rev 6088)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-03-09 13:26:07 UTC (rev 6089)
@@ -2133,16 +2133,24 @@
for(i = 0; i < mapvote_count; ++i)
if(mapvote_maps[i] != "")
{
- WriteString(MSG_ENTITY, mapvote_maps[i]);
- mapfile = strcat(mapvote_screenshot_dir, "/", mapvote_maps[i]);
- pakfile = whichpack(strcat(mapfile, ".tga"));
- if(pakfile == "")
- pakfile = whichpack(strcat(mapfile, ".jpg"));
- if(pakfile == "")
- pakfile = whichpack(strcat(mapfile, ".png"));
- for(o = strstr(pakfile, "/", 0)+1; o > 0; o = strstr(pakfile, "/", 0)+1)
- pakfile = substring(pakfile, o, 999);
- WriteString(MSG_ENTITY, pakfile);
+ if(mapvote_abstain && i == mapvote_count - 1)
+ {
+ WriteString(MSG_ENTITY, ""); // abstain needs no text
+ WriteString(MSG_ENTITY, ""); // abstain needs no pack
+ }
+ else
+ {
+ WriteString(MSG_ENTITY, mapvote_maps[i]);
+ mapfile = strcat(mapvote_screenshot_dir, "/", mapvote_maps[i]);
+ pakfile = whichpack(strcat(mapfile, ".tga"));
+ if(pakfile == "")
+ pakfile = whichpack(strcat(mapfile, ".jpg"));
+ if(pakfile == "")
+ pakfile = whichpack(strcat(mapfile, ".png"));
+ for(o = strstr(pakfile, "/", 0)+1; o > 0; o = strstr(pakfile, "/", 0)+1)
+ pakfile = substring(pakfile, o, 999);
+ WriteString(MSG_ENTITY, pakfile);
+ }
}
}
More information about the nexuiz-commits
mailing list