From: Mario Date: Thu, 13 Nov 2014 14:35:30 +0000 (+1100) Subject: Add an event log print to replace player place message in console X-Git-Tag: xonotic-v0.8.0~164^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=927324a4fc226c9d124618c5456f469cd458dad8;p=xonotic%2Fxonotic-data.pk3dir.git Add an event log print to replace player place message in console --- diff --git a/qcsrc/server/mutators/gamemode_cts.qc b/qcsrc/server/mutators/gamemode_cts.qc index 9be1dc542..9c674d45d 100644 --- a/qcsrc/server/mutators/gamemode_cts.qc +++ b/qcsrc/server/mutators/gamemode_cts.qc @@ -43,6 +43,12 @@ void cts_ScoreRules() ScoreRules_basics_end(); } +void cts_EventLog(string mode, entity actor) // use an alias for easy changing and quick editing later +{ + if(autocvar_sv_eventlog) + GameLogEcho(strcat(":cts:", mode, ":", ((actor != world) ? (strcat(":", ftos(actor.playerid))) : ""))); +} + MUTATOR_HOOKFUNCTION(cts_PlayerPhysics) { // force kbd movement for fairness @@ -112,7 +118,7 @@ MUTATOR_HOOKFUNCTION(cts_ResetMap) if(!s) e.race_place = 0; } - print(e.netname, " = ", ftos(e.race_place), "\n"); + cts_EventLog(ftos(e.race_place), e); } if(g_race_qualifying == 2) diff --git a/qcsrc/server/mutators/gamemode_race.qc b/qcsrc/server/mutators/gamemode_race.qc index fd438d8d9..da5ca4c10 100644 --- a/qcsrc/server/mutators/gamemode_race.qc +++ b/qcsrc/server/mutators/gamemode_race.qc @@ -50,6 +50,12 @@ void race_ScoreRules() ScoreRules_basics_end(); } +void race_EventLog(string mode, entity actor) // use an alias for easy changing and quick editing later +{ + if(autocvar_sv_eventlog) + GameLogEcho(strcat(":race:", mode, ":", ((actor != world) ? (strcat(":", ftos(actor.playerid))) : ""))); +} + MUTATOR_HOOKFUNCTION(race_PlayerPhysics) { // force kbd movement for fairness @@ -119,7 +125,7 @@ MUTATOR_HOOKFUNCTION(race_ResetMap) if(!s) e.race_place = 0; } - print(e.netname, " = ", ftos(e.race_place), "\n"); + race_EventLog(ftos(e.race_place), e); } if(g_race_qualifying == 2)