- 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
@@ -283,7 +283,7 @@ namespace Barotrauma.Tutorials
infoBox = CreateInfoFrame("Steer the submarine downwards, heading further into the cavern.");
while (Submarine.MainSub.WorldPosition.Y > 31900.0f)
while (Submarine.MainSub.WorldPosition.Y > 36500.0f)
{
yield return CoroutineStatus.Running;
}
+11 -1
View File
@@ -142,7 +142,17 @@ namespace Barotrauma
{
dummyLocations = new Location[2];
MTRandom rand = new MTRandom(ToolBox.StringToInt(GameMain.NetLobbyScreen.LevelSeed));
string seed = "";
if (GameMain.GameSession != null && GameMain.GameSession.Level != null)
{
seed = GameMain.GameSession.Level.Seed;
}
else if (GameMain.NetLobbyScreen != null)
{
seed = GameMain.NetLobbyScreen.LevelSeed;
}
MTRandom rand = new MTRandom(ToolBox.StringToInt(seed));
for (int i = 0; i < 2; i++)
{
dummyLocations[i] = Location.CreateRandom(new Vector2((float)rand.NextDouble() * 10000.0f, (float)rand.NextDouble() * 10000.0f));