From e1d4087f5524a97003ff043ac647781cdb0e50f7 Mon Sep 17 00:00:00 2001 From: div0 Date: Fri, 7 Apr 2006 06:49:27 +0000 Subject: [PATCH] event log can list mutators now git-svn-id: svn://svn.icculus.org/nexuiz/trunk@1239 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- Docs/eventlog.txt | 9 +++++++- data/qcsrc/server/gamec/g_world.c | 35 ++++++++++++++++++++++++++----- 2 files changed, 38 insertions(+), 6 deletions(-) diff --git a/Docs/eventlog.txt b/Docs/eventlog.txt index f62cf1727..e8970cf56 100644 --- a/Docs/eventlog.txt +++ b/Docs/eventlog.txt @@ -13,8 +13,15 @@ ______________ log format: ______________ - :logversion:1 + :logversion:2 :gamestart:_: + :gameinfo:mutators:LIST:mutator1:mutator2:... + + (note that mutators are listed by their cvar name with g_ removed, + unless such a cvar is 1 by default - then the mutator is listed with + a no_ prefix if the cvar is 0) + + :gameinfo:end :join::player: :join::bot: :part: diff --git a/data/qcsrc/server/gamec/g_world.c b/data/qcsrc/server/gamec/g_world.c index 47f2d2265..62c52fcab 100644 --- a/data/qcsrc/server/gamec/g_world.c +++ b/data/qcsrc/server/gamec/g_world.c @@ -280,11 +280,36 @@ void worldspawn (void) GameLogInit(); // prepare everything if(cvar("sv_eventlog")) { - local string matchid; - matchid = strcat(cvar_string("sv_eventlog_files_counter"), "."); - matchid = strcat(matchid, ftos(random())); - GameLogEcho(":logversion:1", FALSE); - GameLogEcho(strcat(":gamestart:", GetMapname(), ":", matchid), FALSE); + local string s; + GameLogEcho(":logversion:2", FALSE); + s = strcat(cvar_string("sv_eventlog_files_counter"), "."); + s = strcat(s, ftos(random())); + GameLogEcho(strcat(":gamestart:", GetMapname(), ":", s), FALSE); + s = ":gameinfo:mutators:LIST"; + if(cvar("g_grappling_hook")) + s = strcat(s, ":grappling_hook"); + if(!cvar("g_use_ammunition")) + s = strcat(s, ":no_use_ammunition"); + if(!cvar("g_pickup_items")) + s = strcat(s, ":no_pickup_items"); + if(cvar("g_instagib")) + s = strcat(s, ":instagib"); + if(cvar("g_rocketarena")) + s = strcat(s, ":rockerarena"); + if(cvar("g_nixnex")) + s = strcat(s, ":nixnex"); + if(cvar("g_vampire")) + s = strcat(s, ":vampire"); + if(cvar("g_laserguided_missile")) + s = strcat(s, ":laserguided_missile"); + if(cvar("g_norecoil")) + s = strcat(s, ":norecoil"); + if(cvar("g_midair")) + s = strcat(s, ":midair"); + if(cvar("g_minstagib")) + s = strcat(s, ":minstagib"); + GameLogEcho(s, FALSE); + GameLogEcho(":gameinfo:end", FALSE); } cvar_set("nextmap", ""); -- 2.39.2