Host can spawn in team 2 + relay component state syncing
This commit is contained in:
@@ -28,7 +28,7 @@ namespace Barotrauma
|
||||
|
||||
}
|
||||
|
||||
public override bool AssignTeamIDs(List<Client> clients)
|
||||
public override bool AssignTeamIDs(List<Client> clients,out int hostTeam)
|
||||
{
|
||||
List<Client> randList = new List<Client>(clients);
|
||||
for (int i = 0; i < randList.Count; i++)
|
||||
@@ -51,6 +51,18 @@ namespace Barotrauma
|
||||
randList[i].TeamID = 2;
|
||||
}
|
||||
}
|
||||
if (halfPlayers*2==randList.Count)
|
||||
{
|
||||
hostTeam = Rand.Range(1, 2);
|
||||
}
|
||||
else if (halfPlayers*2<randList.Count)
|
||||
{
|
||||
hostTeam = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
hostTeam = 2;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ namespace Barotrauma
|
||||
|
||||
public virtual void Update(float deltaTime) { }
|
||||
|
||||
public virtual bool AssignTeamIDs(List<Networking.Client> clients) { clients.ForEach(client => { client.TeamID = 1; }); return false; }
|
||||
public virtual bool AssignTeamIDs(List<Networking.Client> clients,out int hostTeam) { clients.ForEach(client => { client.TeamID = 1; }); hostTeam = 1; return false; }
|
||||
|
||||
public void ShowMessage(int index)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user