From 1c27c54f975b43635b1ed8e9c5edd4191c75fe68 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 7 Feb 2013 10:27:59 +1100 Subject: [PATCH] Give players new lives when spawning, rather than on connect (fixes bots with no lives) --- qcsrc/server/mutators/gamemode_lms.qc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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; } -- 2.39.2