- fixed dummy location generation crashing the tutorial

- gameserver handles exceptions thrown when instantiating a new gamesession
- fixed screwdrivers (and other items that can be held in either hand) going into both hand slots when equipping by double clicking
This commit is contained in:
Regalis
2016-11-03 18:22:45 +02:00
parent 799efd8474
commit 8f646a2723
4 changed files with 27 additions and 13 deletions
+10 -11
View File
@@ -886,22 +886,22 @@ namespace Barotrauma.Networking
roundStartSeed = DateTime.Now.Millisecond;
Rand.SetSyncedSeed(roundStartSeed);
GameMain.GameSession = new GameSession(selectedSub, "", selectedMode, Mission.MissionTypes[GameMain.NetLobbyScreen.MissionTypeIndex]);
yield return CoroutineStatus.Running;
bool couldNotStart = false;
int teamCount = 1;
int hostTeam = 1;
if (GameMain.GameSession.gameMode.Mission != null &&
GameMain.GameSession.gameMode.Mission.AssignTeamIDs(connectedClients,out hostTeam))
{
teamCount = 2;
}
bool couldNotStart = false;
try
{
{
GameMain.GameSession = new GameSession(selectedSub, "", selectedMode, Mission.MissionTypes[GameMain.NetLobbyScreen.MissionTypeIndex]);
if (GameMain.GameSession.gameMode.Mission != null &&
GameMain.GameSession.gameMode.Mission.AssignTeamIDs(connectedClients,out hostTeam))
{
teamCount = 2;
}
GameMain.GameSession.StartShift(GameMain.NetLobbyScreen.LevelSeed, teamCount > 1);
}
@@ -914,7 +914,6 @@ namespace Barotrauma.Networking
GameMain.NetLobbyScreen.StartButton.Enabled = true;
couldNotStart = true;
}
if (couldNotStart) yield return CoroutineStatus.Failure;