]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move reset_map LMS score back into arena.qc to fix clients getting double lives
authorMario <mario.mario@y7mail.com>
Wed, 6 Feb 2013 23:23:45 +0000 (10:23 +1100)
committerMario <mario.mario@y7mail.com>
Wed, 6 Feb 2013 23:23:45 +0000 (10:23 +1100)
qcsrc/server/arena.qc
qcsrc/server/mutators/gamemode_lms.qc

index a2298c6fb719b38f5cdb7dc0509799b725d33f91..ef81fd92bad7db138edb2fa1e1067d252bae875b 100644 (file)
@@ -108,6 +108,8 @@ void reset_map(float dorespawn)
                                        //NEW: changed behaviour so that it prevents that previous spectators/observers suddenly spawn as players
                                        if (self.classname == "player") {
                                                //PlayerScore_Clear(self);
+                                               if(g_lms)
+                                                       PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives());
                                                self.killcount = 0;
                                                //stop the player from moving so that he stands still once he gets respawned
                                                self.velocity = '0 0 0';
index 8d336e60e39bf6a4fd48e509582d1731620bc77a..1e9db0e7dac7c11853a6dd1fee6e0bb086c35a25 100644 (file)
@@ -31,8 +31,6 @@ MUTATOR_HOOKFUNCTION(lms_RemovePlayer)
 
 MUTATOR_HOOKFUNCTION(lms_PlayerSpawn)
 {
-       PlayerScore_Add(self, SP_LMS_LIVES, LMS_NewPlayerLives());
-       
        // player is dead and becomes observer
        // FIXME fix LMS scoring for new system
        if(PlayerScore_Add(self, SP_LMS_RANK, 0) > 0)