r2128 - in trunk: . data/qcsrc/server misc
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Wed Jan 17 13:42:58 EST 2007
Author: div0
Date: 2007-01-17 13:42:58 -0500 (Wed, 17 Jan 2007)
New Revision: 2128
Added:
trunk/nexuiz-dinput.bat
Modified:
trunk/data/qcsrc/server/g_world.qc
trunk/misc/makebuild.sh
Log:
only shuffle ONCE, add nexuiz-dinput.bat
Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc 2007-01-17 18:36:45 UTC (rev 2127)
+++ trunk/data/qcsrc/server/g_world.qc 2007-01-17 18:42:58 UTC (rev 2128)
@@ -1,5 +1,6 @@
string GetMapname();
void GotoNextMap();
+void HandleMaplistShuffleCommands();
void SetDefaultAlpha()
{
@@ -53,6 +54,7 @@
if(cvar("_sv_init"))
{
cvar_set("_sv_init", "0");
+ HandleMaplistShuffleCommands();
tokenize(cvar_string("g_maplist"));
if(argv(0) != GetMapname())
{
@@ -337,6 +339,9 @@
// 63 testing
lightstyle(63, "a");
+ registercvar("_g_maplist_shufflenow", "0");
+ registercvar("_g_maplist_have_shuffled", "0");
+
player_count = 0;
lms_lowest_lives = 0;
lms_next_place = 0;
@@ -1442,6 +1447,31 @@
cvar_set("g_maplist", result);
}
+void() HandleMaplistShuffleCommands =
+{
+ // automatically shuffle when setting g_maplist_shuffle
+ if(cvar_string("_g_maplist_add") != "")
+ {
+ AddToMaplist(cvar_string("_g_maplist_add"));
+ cvar_set("_g_maplist_add", "");
+ }
+ if(cvar_string("_g_maplist_remove") != "")
+ {
+ RemoveFromMaplist(cvar_string("_g_maplist_remove"));
+ cvar_set("_g_maplist_remove", "");
+ }
+ if(cvar("_g_maplist_shufflenow") || (cvar("g_maplist_shuffle") && !cvar("_g_maplist_have_shuffled")))
+ {
+ ShuffleMaplist();
+ cvar_set("_g_maplist_shufflenow", "0");
+ cvar_set("_g_maplist_have_shuffled", "1");
+ ServerConsoleEcho("Shuffled map list.", FALSE);
+ }
+ if(cvar("_g_maplist_have_shuffled"))
+ if(!cvar("g_maplist_shuffle"))
+ cvar_set("_g_maplist_have_shuffled", "0");
+}
+
/*
============
CheckRules_World
@@ -1477,25 +1507,7 @@
PrintScoreboard();
}
- // automatically shuffle when setting g_maplist_shuffle
- if(cvar_string("_g_maplist_add") != "")
- {
- AddToMaplist(cvar_string("_g_maplist_add"));
- cvar_set("_g_maplist_add", "");
- }
- if(cvar_string("_g_maplist_remove") != "")
- {
- RemoveFromMaplist(cvar_string("_g_maplist_remove"));
- cvar_set("_g_maplist_remove", "");
- }
- if(cvar("_g_maplist_shufflenow") || (cvar("g_maplist_shuffle") && !cvar("_g_maplist_have_shuffled")))
- {
- ShuffleMaplist();
- localcmd("set _g_maplist_shufflenow 0\nset _g_maplist_have_shuffled 1\necho Shuffled map list.\n");
- }
- if(cvar("_g_maplist_have_shuffled"))
- if(!cvar("g_maplist_shuffle"))
- localcmd("set _g_maplist_have_shuffled 0\n");
+ HandleMaplistShuffleCommands();
timelimit = cvar("timelimit") * 60;
fraglimit = cvar("fraglimit");
Modified: trunk/misc/makebuild.sh
===================================================================
--- trunk/misc/makebuild.sh 2007-01-17 18:36:45 UTC (rev 2127)
+++ trunk/misc/makebuild.sh 2007-01-17 18:42:58 UTC (rev 2128)
@@ -60,12 +60,12 @@
build64()
{
- PATH=$copystrip:$PATH make CC="gcc -g -Wl,--hash-style=sysv,-O1" "$@"
+ PATH=$copystrip:$PATH make CC="/opt/gcc-4.1.1/bin/gcc -g" "$@"
}
build32()
{
- PATH=$copystrip:$PATH make CC="gcc -g -Wl,--hash-style=sysv,-O1 -I$ia32/usr/include -I$ia32/usr/X11R6/include -L$ia32/usr/lib -L$ia32/usr/X11R6/lib -m32" DP_MACHINE=i686 "$@"
+ PATH=$copystrip:$PATH make CC="/opt/gcc-4.1.1/bin/gcc -g -I$ia32/usr/include -I$ia32/usr/X11R6/include -L$ia32/usr/lib -L$ia32/usr/X11R6/lib -m32" DP_MACHINE=i686 "$@"
}
buildwin()
@@ -111,8 +111,7 @@
cp nexuiz-$x-withdebug "$tmpdir/debuginfo/nexuiz-linux-x86_64-$x"
done
-cp "$nexdir/nexuiz-linux-sdl.sh" "$tmpdir/"
-cp "$nexdir/nexuiz-linux-glx.sh" "$tmpdir/"
+cp "$nexdir/"nexuiz-*.{sh,bat} "$tmpdir/"
cp "$nexdir/gpl.txt" "$tmpdir/"
make clean
@@ -130,7 +129,7 @@
7za a -mx=9 -tzip ../sources/gamesource$date.zip qcsrc
cd "$dpdir"
-rm -f ChangeLog
+rm -f ChangeLog*
cvs2cl.pl
cd "$dpdir/.."
Added: trunk/nexuiz-dinput.bat
===================================================================
--- trunk/nexuiz-dinput.bat (rev 0)
+++ trunk/nexuiz-dinput.bat 2007-01-17 18:42:58 UTC (rev 2128)
@@ -0,0 +1,3 @@
+ at echo off
+
+nexuiz -dinput %1 %2 %3 %4 %5 %6 %7 %8 %9
More information about the nexuiz-commits
mailing list