From: Mario Date: Wed, 6 Feb 2013 23:49:28 +0000 (+1100) Subject: Temporary hack to give bots lives X-Git-Tag: xonotic-v0.7.0~60^2~8 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d770f44123c140eb3c19f2f10beb6aeb00e2b133;p=xonotic%2Fxonotic-data.pk3dir.git Temporary hack to give bots lives --- diff --git a/qcsrc/server/mutators/gamemode_lms.qc b/qcsrc/server/mutators/gamemode_lms.qc index 1e9db0e7d..be84a517c 100644 --- a/qcsrc/server/mutators/gamemode_lms.qc +++ b/qcsrc/server/mutators/gamemode_lms.qc @@ -114,6 +114,18 @@ MUTATOR_HOOKFUNCTION(lms_FilterItem) return TRUE; } +MUTATOR_HOOKFUNCTION(lms_BotSpawn) +{ + // temporary hack to give bots lives + if(PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()) <= 0) + { + PlayerScore_Add(self, SP_LMS_RANK, 666); + self.frags = FRAGS_SPECTATOR; + } + + return FALSE; +} + // scoreboard stuff void lms_ScoreRules() { @@ -142,6 +154,7 @@ MUTATOR_DEFINITION(gamemode_lms) MUTATOR_HOOK(SetStartItems, lms_SetStartItems, CBC_ORDER_ANY); MUTATOR_HOOK(PlayerClearScore, lms_KeepScore, CBC_ORDER_ANY); MUTATOR_HOOK(FilterItem, lms_FilterItem, CBC_ORDER_ANY); + MUTATOR_HOOK(HavocBot_ChooseRule, lms_BotSpawn, CBC_ORDER_ANY); MUTATOR_ONADD {