[nexuiz-commits] r8014 - in branches/nexuiz-2.0: . data data/qcsrc/server misc/tools
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Sat Oct 3 06:25:20 EDT 2009
Author: div0
Date: 2009-10-03 06:25:19 -0400 (Sat, 03 Oct 2009)
New Revision: 8014
Modified:
branches/nexuiz-2.0/.patchsets
branches/nexuiz-2.0/data/Makefile
branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc
branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
branches/nexuiz-2.0/data/qcsrc/server/scores.qc
branches/nexuiz-2.0/misc/tools/makebuild.sh
Log:
r8004 | lordhavoc | 2009-10-01 15:58:51 -0400 (Thu, 01 Oct 2009) | 2 lines
allow firing weapons on subframes (client moves) for better accuracy
r8010 | div0 | 2009-10-02 11:19:28 -0400 (Fri, 02 Oct 2009) | 2 lines
makefile typo, and firig of eos
r8011 | div0 | 2009-10-03 05:46:14 -0400 (Sat, 03 Oct 2009) | 2 lines
overtime fix
r8012 | div0 | 2009-10-03 06:08:26 -0400 (Sat, 03 Oct 2009) | 2 lines
remove a never-called line of code
r8013 | div0 | 2009-10-03 06:23:58 -0400 (Sat, 03 Oct 2009) | 1 line
win32 build not using the debian chroot any more (please test the exe files)
Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets 2009-10-03 10:23:58 UTC (rev 8013)
+++ branches/nexuiz-2.0/.patchsets 2009-10-03 10:25:19 UTC (rev 8014)
@@ -1,2 +1,2 @@
master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-7945,7948-7948,7951-7990,7993-8002,8005-8008
+revisions_applied = 1-7945,7948-7948,7951-7990,7993-8013
Modified: branches/nexuiz-2.0/data/Makefile
===================================================================
--- branches/nexuiz-2.0/data/Makefile 2009-10-03 10:23:58 UTC (rev 8013)
+++ branches/nexuiz-2.0/data/Makefile 2009-10-03 10:25:19 UTC (rev 8014)
@@ -56,10 +56,10 @@
rm -f progs.dat menu.dat csprogs.dat
csprogs.dat: qcsrc/client/*.* qcsrc/common/*.*
- cd qcsrc/client && $(FTEQCC) $(FTEQCCFLAGS) $(QCFLAGS_CSPROGS)
+ cd qcsrc/client && $(FTEQCC) $(FTEQCCFLAGS) $(FTEQCCFLAGS_CSPROGS)
progs.dat: qcsrc/server/*.* qcsrc/common/*.* qcsrc/server/*/*.* qcsrc/server/*/*/*.*
- cd qcsrc/server && $(FTEQCC) $(FTEQCCFLAGS) $(QCFLAGS_PROGS)
+ cd qcsrc/server && $(FTEQCC) $(FTEQCCFLAGS) $(FTEQCCFLAGS_PROGS)
menu.dat: qcsrc/menu/*.* qcsrc/menu/*/*.* qcsrc/common/*.*
cd qcsrc/menu && $(FTEQCC) $(FTEQCCFLAGS) $(FTEQCCFLAGS_MENU)
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc 2009-10-03 10:23:58 UTC (rev 8013)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_client.qc 2009-10-03 10:25:19 UTC (rev 8014)
@@ -2522,7 +2522,8 @@
GrapplingHookFrame();
- if(frametime)
+ // LordHavoc: allow firing on move frames (sub-ticrate), this gives better timing on slow servers
+ //if(frametime)
{
self.items &~= self.items_added;
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc 2009-10-03 10:23:58 UTC (rev 8013)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weapons.qc 2009-10-03 10:25:19 UTC (rev 8014)
@@ -299,6 +299,9 @@
{
vector fo, ri, up;
+ if (frametime)
+ self.weapon_frametime = frametime;
+
if((arena_roundbased && time < warmup) || ((time < game_starttime) && !cvar("sv_ready_restart_after_countdown")))
return;
@@ -335,7 +338,7 @@
else if (self.weaponentity.state == WS_READY)
{
#ifndef INDEPENDENT_ATTACK_FINISHED
- if(ATTACK_FINISHED(self) <= time + frametime * 0.5)
+ if(ATTACK_FINISHED(self) <= time + self.weapon_frametime * 0.5)
{
#endif
// UGLY WORKAROUND: play this on CHAN_WEAPON2 so it can't cut off fire sounds
@@ -350,6 +353,10 @@
}
}
+ // LordHavoc: network timing test code
+ //if (self.button0)
+ // print(ftos(frametime), " ", ftos(time), " >= ", ftos(ATTACK_FINISHED(self)), " >= ", ftos(self.weapon_nextthink), "\n");
+
float wb;
wb = W_WeaponBit(self.weapon);
@@ -373,7 +380,7 @@
v_up = up;
weapon_action(self.weapon, WR_THINK);
}
- if (time + frametime * 0.5 >= self.weapon_nextthink)
+ if (time + self.weapon_frametime * 0.5 >= self.weapon_nextthink)
{
if(self.weapon_think)
{
Modified: branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2009-10-03 10:23:58 UTC (rev 8013)
+++ branches/nexuiz-2.0/data/qcsrc/server/cl_weaponsystem.qc 2009-10-03 10:25:19 UTC (rev 8014)
@@ -7,6 +7,8 @@
===========================================================================
*/
+.float weapon_frametime;
+
float W_WeaponRateFactor()
{
float t;
@@ -1025,7 +1027,7 @@
if(attacktime >= 0)
{
// don't fire if previous attack is not finished
- if (ATTACK_FINISHED(self) > time + frametime * 0.5)
+ if (ATTACK_FINISHED(self) > time + self.weapon_frametime * 0.5)
return FALSE;
// don't fire while changing weapon
if (self.weaponentity.state != WS_READY)
@@ -1038,7 +1040,7 @@
// if the weapon hasn't been firing continuously, reset the timer
if(attacktime >= 0)
{
- if (ATTACK_FINISHED(self) < time - frametime * 1.5)
+ if (ATTACK_FINISHED(self) < time - self.weapon_frametime * 1.5)
{
ATTACK_FINISHED(self) = time;
//dprint("resetting attack finished to ", ftos(time), "\n");
@@ -1168,7 +1170,7 @@
self.weapon_nextthink = time;
//dprint("started firing at ", ftos(time), "\n");
}
- if (self.weapon_nextthink < time - frametime * 1.5 || self.weapon_nextthink > time + frametime * 1.5)
+ if (self.weapon_nextthink < time - self.weapon_frametime * 1.5 || self.weapon_nextthink > time + self.weapon_frametime * 1.5)
{
self.weapon_nextthink = time;
//dprint("reset weapon animation timer at ", ftos(time), "\n");
Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-10-03 10:23:58 UTC (rev 8013)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc 2009-10-03 10:25:19 UTC (rev 8014)
@@ -1394,7 +1394,7 @@
float WINNING_NEVER = 2; // no winner, enter overtime if time limit is reached
float WINNING_STARTSUDDENDEATHOVERTIME = 3; // no winner, enter suddendeath overtime NOW
-void InitiateOvertime()
+float InitiateSuddenDeath()
{
// Check first whether normal overtimes could be added before initiating suddendeath mode
// - for this timelimit_overtime needs to be >0 of course
@@ -1402,26 +1402,7 @@
// again, if at the point at which timelimit would be extended again, still no winner was found
if ((checkrules_overtimesadded >= 0) && (checkrules_overtimesadded < cvar("timelimit_overtimes")) && cvar("timelimit_overtime") && !(g_race && !g_race_qualifying))
{
- ++checkrules_overtimesadded;
- //add one more overtime by simply extending the timelimit
- float tl;
- tl = cvar("timelimit");
- tl += cvar("timelimit_overtime");
- cvar_set("timelimit", ftos(tl));
- string minutesPlural;
- if (cvar("timelimit_overtime") == 1)
- minutesPlural = " ^3minute";
- else
- minutesPlural = " ^3minutes";
-
- bcenterprint(
- strcat(
- "^3Now playing ^1OVERTIME^3!\n\n^3Added ^1",
- ftos(cvar("timelimit_overtime")),
- minutesPlural,
- " to the game!"
- )
- );
+ return 1; // need to call InitiateOvertime later
}
else
{
@@ -1431,9 +1412,34 @@
if(g_race && !g_race_qualifying)
race_StartCompleting();
}
+ return 0;
}
}
+void InitiateOvertime() // ONLY call this if InitiateSuddenDeath returned true
+{
+ ++checkrules_overtimesadded;
+ //add one more overtime by simply extending the timelimit
+ float tl;
+ tl = cvar("timelimit");
+ tl += cvar("timelimit_overtime");
+ cvar_set("timelimit", ftos(tl));
+ string minutesPlural;
+ if (cvar("timelimit_overtime") == 1)
+ minutesPlural = " ^3minute";
+ else
+ minutesPlural = " ^3minutes";
+
+ bcenterprint(
+ strcat(
+ "^3Now playing ^1OVERTIME^3!\n\n^3Added ^1",
+ ftos(cvar("timelimit_overtime")),
+ minutesPlural,
+ " to the game!"
+ )
+ );
+}
+
float GetWinningCode(float fraglimitreached, float equality)
{
if(equality)
@@ -1896,6 +1902,9 @@
return;
}
+ float wantovertime;
+ wantovertime = 0;
+
if(checkrules_suddendeathend)
{
if(!checkrules_suddendeathwarning)
@@ -1936,10 +1945,10 @@
return;
}
else
- InitiateOvertime();
+ wantovertime |= InitiateSuddenDeath();
}
else
- InitiateOvertime();
+ wantovertime |= InitiateSuddenDeath();
}
}
@@ -1987,13 +1996,21 @@
{
checkrules_status = WINNING_NEVER;
checkrules_overtimesadded = -1;
- InitiateOvertime();
+ wantovertime |= InitiateSuddenDeath();
}
if(checkrules_status == WINNING_NEVER)
// equality cases! Nobody wins if the overtime ends in a draw.
ClearWinners();
+ if(wantovertime)
+ {
+ if(checkrules_status == WINNING_NEVER)
+ InitiateOvertime();
+ else
+ checkrules_status = WINNING_YES;
+ }
+
if(checkrules_suddendeathend)
if(checkrules_status != WINNING_NEVER || time >= checkrules_suddendeathend)
checkrules_status = WINNING_YES;
Modified: branches/nexuiz-2.0/data/qcsrc/server/scores.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/scores.qc 2009-10-03 10:23:58 UTC (rev 8013)
+++ branches/nexuiz-2.0/data/qcsrc/server/scores.qc 2009-10-03 10:25:19 UTC (rev 8014)
@@ -460,9 +460,6 @@
WinningConditionHelper_secondteam = -1; // no teamplay
}
- if(teamscores_flags_primary & SFL_TIME)
- WinningConditionHelper_topscore /= 10;
-
if(WinningConditionHelper_topscore == 0)
{
if(scores_flags_primary & SFL_ZERO_IS_WORST)
Modified: branches/nexuiz-2.0/misc/tools/makebuild.sh
===================================================================
--- branches/nexuiz-2.0/misc/tools/makebuild.sh 2009-10-03 10:23:58 UTC (rev 8013)
+++ branches/nexuiz-2.0/misc/tools/makebuild.sh 2009-10-03 10:25:19 UTC (rev 8014)
@@ -27,7 +27,6 @@
fteqccflags=""
menuqc=menu
newest=NEWEST
-aft="perl -I/chroot/debian-etch/usr/share/aft /chroot/debian-etch/usr/bin/aft"
# end system specific stuff
case "$pw" in
@@ -110,9 +109,11 @@
build()
{
- buildon alientrap.org nexuiz fteqcc.exe /tmp/Darkplaces.build 'DP_MAKE_TARGET=mingw CC="/chroot/debian-etch/usr/bin/i586-mingw32msvc-gcc -g -DSUPPORTDIRECTX -I$HOME/dxheaders" WINDRES=/chroot/debian-etch/usr/bin/i586-mingw32msvc-windres SDL_CONFIG=$HOME/sdl-win32/SDL-1.2.13/bin/sdl-config' /chroot/debian-etch/usr/bin/i586-mingw32msvc-strip
+# buildon alientrap.org nexuiz fteqcc.exe /tmp/Darkplaces.build 'DP_MAKE_TARGET=mingw CC="/chroot/debian-etch/usr/bin/i586-mingw32msvc-gcc -g -DSUPPORTDIRECTX -I$HOME/dxheaders" WINDRES=/chroot/debian-etch/usr/bin/i586-mingw32msvc-windres SDL_CONFIG=$HOME/sdl-win32/SDL-1.2.13/bin/sdl-config' /chroot/debian-etch/usr/bin/i586-mingw32msvc-strip
+ buildon nex686build nexuiz fteqcc.exe /tmp/Darkplaces.build 'DP_MAKE_TARGET=mingw CC="$HOME/mingw32/bin/i386-mingw32-gcc -g -DSUPPORTDIRECTX -I$HOME/dxheaders" WINDRES="$HOME/mingw32/bin/i386-mingw32-windres" SDL_CONFIG="$HOME/sdl-win32/SDL-1.2.13/bin/sdl-config"' '"$HOME/mingw32/bin/i386-mingw32-strip"'
+ buildon nex686build nexuiz-linux-686 fteqcc-linux-686 /tmp/Darkplaces.build 'CC="gcc -g" DP_MODPLUG_STATIC_LIBDIR=$HOME/modplug-i386/lib DP_LINK_TO_LIBJPEG=1 LDFLAGS_LIBJPEG="$HOME/jpeg7/lib/libjpeg.a" CFLAGS_LIBJPEG="-I$HOME/jpeg7/include"' strip
+# buildon eos.thruhere.net nexuiz-linux-686 fteqcc-linux-686 /tmp/Darkplaces.build 'CC="gcc -g" DP_MODPLUG_STATIC_LIBDIR=$HOME/modplug-i386/lib DP_LINK_TO_LIBJPEG=1 LDFLAGS_LIBJPEG="$HOME/jpeg7/lib/libjpeg.a" CFLAGS_LIBJPEG="-I$HOME/jpeg7/include"' strip
buildon nexmacbuild nexuiz-osx fteqcc-osx /tmp/Darkplaces.build 'CC="gcc -g -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"' strip
- buildon eos.thruhere.net nexuiz-linux-686 fteqcc-linux-686 /tmp/Darkplaces.build 'CC="gcc -g" DP_MODPLUG_STATIC_LIBDIR=$HOME/modplug-i386/lib DP_LINK_TO_LIBJPEG=1 LDFLAGS_LIBJPEG="$HOME/jpeg7/lib/libjpeg.a" CFLAGS_LIBJPEG="-I$HOME/jpeg7/include"' strip
buildon alientrap.org nexuiz-linux-x86_64 fteqcc-linux-x86_64 /tmp/Darkplaces.build 'CC="gcc -g -Wl,--hash-style=sysv" DP_MODPLUG_STATIC_LIBDIR=/home/divverent/modplug-x86_64/lib DP_LINK_TO_LIBJPEG=1 LDFLAGS_LIBJPEG="$HOME/jpeg7/lib/libjpeg.a" CFLAGS_LIBJPEG="-I$HOME/jpeg7/include"' strip
mv "$tmpdir/nexuiz-osx-agl" "$tmpdir/Nexuiz.app/Contents/MacOS/nexuiz-osx-agl-bin"
mv "$tmpdir/nexuiz-osx-sdl" "$tmpdir/Nexuiz-SDL.app/Contents/MacOS/nexuiz-osx-sdl-bin"
More information about the nexuiz-commits
mailing list