[nexuiz-commits] r6573 - in branches/nexuiz-2.0: . data/qcsrc/client data/qcsrc/common data/qcsrc/menu data/qcsrc/menu/nexuiz data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Wed Apr 22 15:52:02 EDT 2009


Author: div0
Date: 2009-04-22 15:52:01 -0400 (Wed, 22 Apr 2009)
New Revision: 6573

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/data/qcsrc/client/Main.qc
   branches/nexuiz-2.0/data/qcsrc/common/util.qc
   branches/nexuiz-2.0/data/qcsrc/common/util.qh
   branches/nexuiz-2.0/data/qcsrc/menu/menu.qc
   branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
r6567 | esteel | 2009-04-22 19:52:42 +0200 (Wed, 22 Apr 2009) | 2 lines
fix simple vote majority in the menu
r6572 | div0 | 2009-04-22 21:46:44 +0200 (Wed, 22 Apr 2009) | 2 lines
detect the current fteqcc compiler bug, and abort if the progs are horribly broken because of it


Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2009-04-22 19:46:44 UTC (rev 6572)
+++ branches/nexuiz-2.0/.patchsets	2009-04-22 19:52:01 UTC (rev 6573)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-6536,6541-6549,6552-6565
+revisions_applied = 1-6536,6541-6549,6552-6567,6572-6572

Modified: branches/nexuiz-2.0/data/qcsrc/client/Main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/Main.qc	2009-04-22 19:46:44 UTC (rev 6572)
+++ branches/nexuiz-2.0/data/qcsrc/client/Main.qc	2009-04-22 19:52:01 UTC (rev 6573)
@@ -56,6 +56,8 @@
 	}
 #pragma target FTE
 #endif
+	
+	check_unacceptable_compiler_bugs();
 
 	float i;
 	CSQC_CheckEngine();

Modified: branches/nexuiz-2.0/data/qcsrc/common/util.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/util.qc	2009-04-22 19:46:44 UTC (rev 6572)
+++ branches/nexuiz-2.0/data/qcsrc/common/util.qc	2009-04-22 19:52:01 UTC (rev 6573)
@@ -1613,3 +1613,18 @@
 	}
 	return v;
 }
+
+
+float _unacceptable_compiler_bug_1_a(float b, float c) { return b == c; }
+float _unacceptable_compiler_bug_1_b() { return 1; }
+float _unacceptable_compiler_bug_1_c(float d) { return 2 * d; }
+float _unacceptable_compiler_bug_1_d() { return 1; }
+
+void check_unacceptable_compiler_bugs()
+{
+	if(cvar("_allow_unacceptable_compiler_bugs"))
+		return;
+	tokenize_sane("foo bar");
+	if(strcat(argv(0), substring("foo bar", 4, 7 - argv_start_index(1))) == "barbar")
+		error("fteqcc bug introduced with revision 3178 detected. Please upgrade fteqcc to a later revision, downgrade fteqcc to revision 3177, or pester Spike until he fixes it. You can set _allow_unacceptable_compiler_bugs 1 to skip this check, but expect stuff to be horribly broken then.");
+}

Modified: branches/nexuiz-2.0/data/qcsrc/common/util.qh
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/common/util.qh	2009-04-22 19:46:44 UTC (rev 6572)
+++ branches/nexuiz-2.0/data/qcsrc/common/util.qh	2009-04-22 19:52:01 UTC (rev 6573)
@@ -166,3 +166,5 @@
 // solution 2 -> y
 // z = 1 if a real solution exists, 0 if not
 // if no real solution exists, x contains the real part and y the imaginary part of the complex solutions x+iy and x-iy
+
+void check_unacceptable_compiler_bugs();

Modified: branches/nexuiz-2.0/data/qcsrc/menu/menu.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/menu.qc	2009-04-22 19:46:44 UTC (rev 6572)
+++ branches/nexuiz-2.0/data/qcsrc/menu/menu.qc	2009-04-22 19:52:01 UTC (rev 6573)
@@ -21,6 +21,7 @@
 void() m_init =
 {
 	dprint_load();
+	check_unacceptable_compiler_bugs();
 }
 
 void UpdateConWidthHeight()

Modified: branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c	2009-04-22 19:46:44 UTC (rev 6572)
+++ branches/nexuiz-2.0/data/qcsrc/menu/nexuiz/dialog_multiplayer_create.c	2009-04-22 19:52:01 UTC (rev 6573)
@@ -150,7 +150,7 @@
 			e.addValue(e, "9 choices", "9");
 			e.configureNexuizTextSliderValues(e);
 	me.TR(me);
-		me.TD(me, 1, 3, e = makeNexuizCheckBox(0, "sv_vote_simple_majority", "Simple majority wins vcall"));
+		me.TD(me, 1, 3, e = makeNexuizCheckBoxEx(0.5, 0, "sv_vote_simple_majority_factor", "Simple majority wins vcall"));
 	me.TR(me);
 	me.TR(me);
 		me.TD(me, 1, 1, e = makeNexuizButton("Mutators...", '0 0 0'));

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2009-04-22 19:46:44 UTC (rev 6572)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2009-04-22 19:52:01 UTC (rev 6573)
@@ -386,6 +386,8 @@
 
 	remove = remove_safely; // during spawning, watch what you remove!
 
+	check_unacceptable_compiler_bugs();
+
 	if(cvar_string("cvar_check_default") != "bypass")
 	{
 		if(cvar_string("cvar_check_default") != CVAR_CHECK_DEFAULT)



More information about the nexuiz-commits mailing list