From ff58f76dc0a9587dbb2c4f23d1c38ee820336fbb Mon Sep 17 00:00:00 2001 From: Flamefire Date: Thu, 25 Apr 2013 19:01:26 +0200 Subject: [PATCH] Updated UsePlayers --- Vocaluxe/Base/CConfig.cs | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Vocaluxe/Base/CConfig.cs b/Vocaluxe/Base/CConfig.cs index 5e72062f..7e58adfa 100644 --- a/Vocaluxe/Base/CConfig.cs +++ b/Vocaluxe/Base/CConfig.cs @@ -833,21 +833,17 @@ namespace Vocaluxe.Base /// public static void UsePlayers() { - for (int i = 0; i < CProfiles.Profiles.Length; i++) + for (int j = 0; j < CSettings.MaxNumPlayer; j++) { - for (int j = 0; j < CSettings.MaxNumPlayer; j++) - { - if (Players[j] != "") + CGame.Players[j].ProfileID = -1; + if (Players[j] == "") + continue; + for (int i = 0; i < CProfiles.Profiles.Length; i++) + if (Path.GetFileName(CProfiles.Profiles[i].ProfileFile) == Players[j] && CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON) { - if (Path.GetFileName(CProfiles.Profiles[i].ProfileFile) == Players[j] && CProfiles.Profiles[i].Active == EOffOn.TR_CONFIG_ON) - { - //Update Game-infos with player - CGame.Players[j].ProfileID = i; - } + //Update Game-infos with player + CGame.Players[j].ProfileID = i; } - else - CGame.Players[j].ProfileID = -1; - } } } }