From: Mario Date: Thu, 13 Nov 2014 14:28:33 +0000 (+1100) Subject: Fix cloaked mode not getting forced enabled in CTS X-Git-Tag: xonotic-v0.8.0~164^2~1 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=a9ebd44ee059a26153139eb87bfae6703dc46bfc;p=xonotic%2Fxonotic-data.pk3dir.git Fix cloaked mode not getting forced enabled in CTS --- diff --git a/qcsrc/server/mutators/gamemode_cts.qc b/qcsrc/server/mutators/gamemode_cts.qc index ef4d53dad..9be1dc542 100644 --- a/qcsrc/server/mutators/gamemode_cts.qc +++ b/qcsrc/server/mutators/gamemode_cts.qc @@ -266,10 +266,15 @@ MUTATOR_HOOKFUNCTION(cts_ForbidClearPlayerScore) return TRUE; // in CTS, you don't lose score by observing } -void cts_Initialize() +MUTATOR_HOOKFUNCTION(cts_SetMods) { g_cloaked = 1; // always enable cloak in CTS + return FALSE; +} + +void cts_Initialize() +{ cts_ScoreRules(); } @@ -289,6 +294,7 @@ MUTATOR_DEFINITION(gamemode_cts) MUTATOR_HOOK(FilterItem, cts_FilterItem, CBC_ORDER_ANY); MUTATOR_HOOK(PlayerDamage_Calculate, cts_PlayerDamage, CBC_ORDER_ANY); MUTATOR_HOOK(ForbidPlayerScore_Clear, cts_ForbidClearPlayerScore, CBC_ORDER_ANY); + MUTATOR_HOOK(SetModname, cts_SetMods, CBC_ORDER_ANY); MUTATOR_ONADD {