Fixed hosts character being taken into account in both teams' job assignment
This commit is contained in:
@@ -1879,7 +1879,9 @@ namespace Barotrauma.Networking
|
|||||||
|
|
||||||
int[] assignedClientCount = new int[JobPrefab.List.Count];
|
int[] assignedClientCount = new int[JobPrefab.List.Count];
|
||||||
|
|
||||||
if (characterInfo != null && assignHost)
|
if (assignHost)
|
||||||
|
{
|
||||||
|
if (characterInfo != null)
|
||||||
{
|
{
|
||||||
assignedClientCount[JobPrefab.List.FindIndex(jp => jp == GameMain.NetLobbyScreen.JobPreferences[0])] = 1;
|
assignedClientCount[JobPrefab.List.FindIndex(jp => jp == GameMain.NetLobbyScreen.JobPreferences[0])] = 1;
|
||||||
}
|
}
|
||||||
@@ -1887,6 +1889,7 @@ namespace Barotrauma.Networking
|
|||||||
{
|
{
|
||||||
assignedClientCount[JobPrefab.List.IndexOf(myCharacter.Info.Job.Prefab)] = 1;
|
assignedClientCount[JobPrefab.List.IndexOf(myCharacter.Info.Job.Prefab)] = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//count the clients who already have characters with an assigned job
|
//count the clients who already have characters with an assigned job
|
||||||
foreach (Client c in connectedClients)
|
foreach (Client c in connectedClients)
|
||||||
|
|||||||
Reference in New Issue
Block a user