r2258 - in trunk/data: . qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Mar 27 10:00:52 EDT 2007


Author: div0
Date: 2007-03-27 10:00:52 -0400 (Tue, 27 Mar 2007)
New Revision: 2258

Modified:
   trunk/data/default.cfg
   trunk/data/qcsrc/server/clientcommands.qc
Log:
// a simple majority suffices to accept a vote (meaning: YES votes > NO votes; otherwise: YES votes > half of the players)
set sv_vote_simple_majority 0


Modified: trunk/data/default.cfg
===================================================================
--- trunk/data/default.cfg	2007-03-27 13:40:46 UTC (rev 2257)
+++ trunk/data/default.cfg	2007-03-27 14:00:52 UTC (rev 2258)
@@ -696,6 +696,8 @@
 set sv_vote_timeout 60
 // a player can not call a vote again for this many seconds
 set sv_vote_wait 120
+// a simple majority suffices to accept a vote (meaning: YES votes > NO votes; otherwise: YES votes > half of the players)
+set sv_vote_simple_majority 0
 alias vhelp "cmd vote help"
 alias vstatus "cmd vote status"
 alias vcall "cmd vote call $*"

Modified: trunk/data/qcsrc/server/clientcommands.qc
===================================================================
--- trunk/data/qcsrc/server/clientcommands.qc	2007-03-27 13:40:46 UTC (rev 2257)
+++ trunk/data/qcsrc/server/clientcommands.qc	2007-03-27 14:00:52 UTC (rev 2258)
@@ -523,7 +523,15 @@
 	} else if((playercount / 2) < nocount) { // vote rejected
 		VoteReject();
 	} else if(time > votefinished) { // vote timedout
-		VoteTimeout();
+		if(cvar("sv_vote_simple_majority"))
+			if(yescount > nocount)
+				VoteAccept();
+			else if(nocount > yescount)
+				VoteReject();
+			else
+				VoteTimeout();
+		else
+			VoteTimeout();
 	} // else still running
 }
 




More information about the nexuiz-commits mailing list