From: Mario Date: Wed, 6 Feb 2013 23:27:59 +0000 (+1100) Subject: Give players new lives when spawning, rather than on connect (fixes bots with no... X-Git-Tag: xonotic-v0.7.0~60^2~10 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1c27c54f975b43635b1ed8e9c5edd4191c75fe68;p=xonotic%2Fxonotic-data.pk3dir.git Give players new lives when spawning, rather than on connect (fixes bots with no lives) --- diff --git a/qcsrc/server/mutators/gamemode_lms.qc b/qcsrc/server/mutators/gamemode_lms.qc index 1e9db0e7d..1e64c86bb 100644 --- a/qcsrc/server/mutators/gamemode_lms.qc +++ b/qcsrc/server/mutators/gamemode_lms.qc @@ -31,6 +31,12 @@ MUTATOR_HOOKFUNCTION(lms_RemovePlayer) MUTATOR_HOOKFUNCTION(lms_PlayerSpawn) { + if(PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()) <= 0) + { + PlayerScore_Add(self, SP_LMS_RANK, 666); + self.frags = FRAGS_SPECTATOR; + } + // player is dead and becomes observer // FIXME fix LMS scoring for new system if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0) @@ -43,12 +49,6 @@ MUTATOR_HOOKFUNCTION(lms_ClientConnect) { self.classname = "player"; campaign_bots_may_start = 1; - - if(PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives()) <= 0) - { - PlayerScore_Add(self, SP_LMS_RANK, 666); - self.frags = FRAGS_SPECTATOR; - } return FALSE; }