Updated UsePlayers

This commit is contained in:
Flamefire committed 2013-04-25 19:01:26 +02:00
1 parent bdca0554e4
commit ff58f76dc0
1 file changed
+8 -12
+8 -12
View File
@@ -833,21 +833,17 @@ namespace Vocaluxe.Base
/// </summary> /// </summary>
public static void UsePlayers() 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++) CGame.Players[j].ProfileID = -1;
{ if (Players[j] == "")
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;
}
} }
} }
} }