r6078 - in branches/nexuiz-2.0: . data/qcsrc/client data/qcsrc/menu/nexuiz data/qcsrc/server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sun Mar 8 06:51:03 EDT 2009
Author: div0
Date: 2009-03-08 06:51:02 -0400 (Sun, 08 Mar 2009)
New Revision: 6078
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc
branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_audio.c
branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
r6077 | div0 | 2009-03-07 23:06:34 +0100 (Sat, 07 Mar 2009) | 2 lines
fix mapvote "keeptwo" feature (wasn't display disappearing maps)
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-03-07 22:06:34 UTC (rev 6077)
+++ branches/nexuiz-2.0/.patchsets 2009-03-08 10:51:02 UTC (rev 6078)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6039,6044-6074
+revisions_applied = 1-6039,6044-6077
Modified: branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc 2009-03-07 22:06:34 UTC (rev 6077)
+++ branches/nexuiz-2.0/data/qcsrc/client/mapvoting.qc 2009-03-08 10:51:02 UTC (rev 6078)
@@ -266,6 +266,8 @@
float i, power;
string map, pk3, ssdir;
+ precache_sound ("misc/invshot.wav");
+
registercmd("+showscores");
registercmd("-showscores");
@@ -323,10 +325,23 @@
void MapVote_UpdateMask()
{
+ float i, power;
+ float oldmask;
+
+ oldmask = mv_maps_mask;
if(mv_num_maps <= 8)
mv_maps_mask = ReadByte();
else
mv_maps_mask = ReadShort();
+
+ if(oldmask & mv_maps_mask != oldmask)
+ if(oldmask & mv_maps_mask == mv_maps_mask)
+ sound(world, CHAN_AUTO, "misc_invshot.wav", VOL_BASE, ATTN_NONE);
+
+ // remove votes that no longer apply
+ for(i = 0, power = 1; i < mv_num_maps; ++i, power *= 2)
+ if not(mv_maps_mask & power)
+ mv_votes[i] = -1;
}
void MapVote_UpdateVotes()
Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_audio.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_audio.c 2009-03-07 22:06:34 UTC (rev 6077)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_settings_audio.c 2009-03-08 10:51:02 UTC (rev 6078)
@@ -43,6 +43,7 @@
me.TDempty(me, 0.2);
s = makeNexuizDecibelsSlider(-20, 0, 0.5, "snd_worldchannel0volume");
me.TD(me, 1, 0.8, e = makeNexuizSliderCheckBox(-1000000, 1, s, "Info:"));
+ makeMulti(s, "snd_csqcchannel0volume");
me.TD(me, 1, 2, s);
setDependentStringNotEqual(e, "volume", "0");
setDependentStringNotEqual(s, "volume", "0");
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-03-07 22:06:34 UTC (rev 6077)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-03-08 10:51:02 UTC (rev 6078)
@@ -2112,6 +2112,9 @@
string mapfile, pakfile;
float i, o;
+ if(sf & 1)
+ sf &~= 2; // if we send 1, we don't need to also send 2
+
WriteByte(MSG_ENTITY, ENT_CLIENT_MAPVOTE);
WriteByte(MSG_ENTITY, sf);
@@ -2335,10 +2338,6 @@
}
}
- // notify about keep-two
- if(keeptwo != 0 && mapvote_keeptwotime == 0)
- play2(other, "misc/invshot.wav");
-
// clear possibly invalid votes
if(mapvote_maps[other.mapvote - 1] == "")
other.mapvote = 0;
More information about the nexuiz-commits
mailing list