r3884 - in branches/nexuiz-2.0: . Docs Docs/server/rcon2irc data/qcsrc/client data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Tue Jul 22 02:34:13 EDT 2008


Author: div0
Date: 2008-07-22 02:34:12 -0400 (Tue, 22 Jul 2008)
New Revision: 3884

Modified:
   branches/nexuiz-2.0/.patchsets
   branches/nexuiz-2.0/Docs/eventlog.txt
   branches/nexuiz-2.0/Docs/server/rcon2irc/rcon2irc.pl
   branches/nexuiz-2.0/data/qcsrc/client/Main.qc
   branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
Log:
r3878 | blub0 | 2008-07-21 20:16:59 +0200 (Mon, 21 Jul 2008) | 1 line
removed debug code which prevents - from being used for binds :(
r3879 | div0 | 2008-07-22 08:23:11 +0200 (Tue, 22 Jul 2008) | 2 lines
add "teamscores" score log entry (for CTF)
r3880 | div0 | 2008-07-22 08:23:29 +0200 (Tue, 22 Jul 2008) | 2 lines
"teamscores" log entry
r3881 | div0 | 2008-07-22 08:24:03 +0200 (Tue, 22 Jul 2008) | 2 lines
writing NOTHING for nonexisting teams would be better...
r3882 | div0 | 2008-07-22 08:32:17 +0200 (Tue, 22 Jul 2008) | 2 lines
better team scores format
r3883 | div0 | 2008-07-22 08:33:08 +0200 (Tue, 22 Jul 2008) | 2 lines
changed team scores format (sorry)

Modified: branches/nexuiz-2.0/.patchsets
===================================================================
--- branches/nexuiz-2.0/.patchsets	2008-07-22 06:33:08 UTC (rev 3883)
+++ branches/nexuiz-2.0/.patchsets	2008-07-22 06:34:12 UTC (rev 3884)
@@ -1,2 +1,2 @@
 master = svn://svn.icculus.org/nexuiz/trunk
-revisions_applied = 1-3876
+revisions_applied = 1-3883

Modified: branches/nexuiz-2.0/Docs/eventlog.txt
===================================================================
--- branches/nexuiz-2.0/Docs/eventlog.txt	2008-07-22 06:33:08 UTC (rev 3883)
+++ branches/nexuiz-2.0/Docs/eventlog.txt	2008-07-22 06:34:12 UTC (rev 3884)
@@ -41,8 +41,9 @@
    :dom:taken:<previouscolor>:<ID of player>
    :scores:<gametype>_<mapname>:<map runtime>
    :player:<frags>:<deaths>:<playtime>:<team>:<ID>:<nickname>
+   :teamscores:<team1color>:<team1score>:<team2color>:<team2score>:...
+   :end
    :restart
-   :end
    :gameover
    :vote:suggested:<mapname>:<playerid>
    :vote:keeptwo:<mapname>:<mapvotes>:<mapname>:<mapvotes>:::<mapname>:<mapvotes>:...:didn't vote:<notvoters>

Modified: branches/nexuiz-2.0/Docs/server/rcon2irc/rcon2irc.pl
===================================================================
--- branches/nexuiz-2.0/Docs/server/rcon2irc/rcon2irc.pl	2008-07-22 06:33:08 UTC (rev 3883)
+++ branches/nexuiz-2.0/Docs/server/rcon2irc/rcon2irc.pl	2008-07-22 06:34:12 UTC (rev 3884)
@@ -1113,6 +1113,14 @@
 		return 0;
 	} ],
 
+	# scores: Nexuiz server -> IRC channel (CTF)
+	[ dp => q{:teamscores:(\d+:-?\d*(?::\d+:-?\d*)*)} => sub {
+		my ($teams) = @_;
+		return if not exists $store{scores};
+		$store{scores}{teams} = {split /:/, $teams};
+		return 0;
+	} ],
+
 	# scores: Nexuiz server -> IRC channel
 	[ dp => q{:end} => sub {
 		return if not exists $store{scores};
@@ -1131,7 +1139,14 @@
 			{
 				my $thisteam = ($t{$_->[1]} ||= {score => 0, team => $_->[1], players => []});
 				push @{$thisteam->{players}}, [$_->[0], $_->[1], $_->[2]];
-				$thisteam->{score} += $_->[0];
+				if($store{scores}{teams})
+				{
+					$thisteam->{score} = $store{scores}{teams}{$_->[1]};
+				}
+				else
+				{
+					$thisteam->{score} += $_->[0];
+				}
 			}
 
 			# sort by team score

Modified: branches/nexuiz-2.0/data/qcsrc/client/Main.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/client/Main.qc	2008-07-22 06:33:08 UTC (rev 3883)
+++ branches/nexuiz-2.0/data/qcsrc/client/Main.qc	2008-07-22 06:34:12 UTC (rev 3884)
@@ -173,12 +173,7 @@
 {
 	local float bSkipKey;
 	bSkipKey = false;
-
-	if(chr2str(nSecondary) == "-") {
-		print(strcat("inputtype: ", ftos(bInputType), "\n"));
-		return true;
-	}
-
+	
 	if(menu_visible)
 		if(menu_action(bInputType, nPrimary, nSecondary))
 			return TRUE;

Modified: branches/nexuiz-2.0/data/qcsrc/server/g_world.qc
===================================================================
--- branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2008-07-22 06:33:08 UTC (rev 3883)
+++ branches/nexuiz-2.0/data/qcsrc/server/g_world.qc	2008-07-22 06:34:12 UTC (rev 3884)
@@ -1010,6 +1010,21 @@
 		}
 	}
 
+	if(g_ctf)
+	if(cvar("g_ctf_win_mode") != 2)
+	{
+		s = strcat(":teamscores:", ftos(COLOR_TEAM1), ":");
+		s = strcat(s, ftos(caps_team1), ":");
+		s = strcat(s, ftos(COLOR_TEAM2), ":");
+		s = strcat(s, ftos(caps_team2));
+		if(to_console)
+			ServerConsoleEcho(s, TRUE);
+		if(to_eventlog)
+			GameLogEcho(s, TRUE);
+		if(to_file)
+			fputs(file, strcat(s, "\n"));
+	}
+
 	if(to_console)
 		ServerConsoleEcho(":end", FALSE);
 	if(to_eventlog)




More information about the nexuiz-commits mailing list