From: Mario <mario.mario@y7mail.com>
Date: Wed, 6 Feb 2013 23:23:45 +0000 (+1100)
Subject: Move reset_map LMS score back into arena.qc to fix clients getting double lives
X-Git-Tag: xonotic-v0.7.0~60^2~11
X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=667ba4ce1cfa497394b1738645d166dbe1a5bf51;p=xonotic%2Fxonotic-data.pk3dir.git

Move reset_map LMS score back into arena.qc to fix clients getting double lives
---

diff --git a/qcsrc/server/arena.qc b/qcsrc/server/arena.qc
index a2298c6fb7..ef81fd92ba 100644
--- a/qcsrc/server/arena.qc
+++ b/qcsrc/server/arena.qc
@@ -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';
diff --git a/qcsrc/server/mutators/gamemode_lms.qc b/qcsrc/server/mutators/gamemode_lms.qc
index 8d336e60e3..1e9db0e7da 100644
--- a/qcsrc/server/mutators/gamemode_lms.qc
+++ b/qcsrc/server/mutators/gamemode_lms.qc
@@ -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)