From 26c571c1dd92eebcbb116377e681620506aa201c Mon Sep 17 00:00:00 2001 From: div0 Date: Tue, 22 Jul 2008 06:34:12 +0000 Subject: [PATCH] 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) git-svn-id: svn://svn.icculus.org/nexuiz/branches/nexuiz-2.0@3884 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- .patchsets | 2 +- Docs/eventlog.txt | 3 ++- Docs/server/rcon2irc/rcon2irc.pl | 17 ++++++++++++++++- data/qcsrc/client/Main.qc | 7 +------ data/qcsrc/server/g_world.qc | 15 +++++++++++++++ 5 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.patchsets b/.patchsets index ba9c8a069..4f7b61c87 100644 --- a/.patchsets +++ b/.patchsets @@ -1,2 +1,2 @@ master = svn://svn.icculus.org/nexuiz/trunk -revisions_applied = 1-3876 +revisions_applied = 1-3883 diff --git a/Docs/eventlog.txt b/Docs/eventlog.txt index d1472cad3..bd925d502 100644 --- a/Docs/eventlog.txt +++ b/Docs/eventlog.txt @@ -41,8 +41,9 @@ ______________ :dom:taken:: :scores:_: :player:::::: - :restart + :teamscores:::::... :end + :restart :gameover :vote:suggested:: :vote:keeptwo:::::::::...:didn't vote: diff --git a/Docs/server/rcon2irc/rcon2irc.pl b/Docs/server/rcon2irc/rcon2irc.pl index 10fe5ae77..3a7917490 100755 --- a/Docs/server/rcon2irc/rcon2irc.pl +++ b/Docs/server/rcon2irc/rcon2irc.pl @@ -1113,6 +1113,14 @@ sub irc_joinstage($) 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 @@ sub irc_joinstage($) { 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 diff --git a/data/qcsrc/client/Main.qc b/data/qcsrc/client/Main.qc index df078818c..1d2d1195c 100644 --- a/data/qcsrc/client/Main.qc +++ b/data/qcsrc/client/Main.qc @@ -173,12 +173,7 @@ float CSQC_InputEvent(float bInputType, float nPrimary, float nSecondary) { 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; diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index f9c8994f6..b22433168 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -1010,6 +1010,21 @@ void DumpStats(float final) } } + 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) -- 2.39.2