Fixed missions not matching between Linux and Windows builds

This commit is contained in:
Regalis
2016-03-28 19:56:32 +03:00
parent c1a1990f08
commit 23f1623562
4 changed files with 5 additions and 17 deletions
@@ -0,0 +1,42 @@
using Microsoft.Xna.Framework;
namespace Barotrauma
{
class MissionMode : GameMode
{
private Mission mission;
public override Mission Mission
{
get
{
return mission;
}
}
public MissionMode(GameModePreset preset)
: base(preset)
{
Location[] locations = new Location[2];
MTRandom rand = new MTRandom(ToolBox.StringToInt(GameMain.NetLobbyScreen.LevelSeed));
for (int i = 0; i < 2; i++)
{
locations[i] = Location.CreateRandom(new Vector2((float)rand.NextDouble() * 10000.0f, (float)rand.NextDouble() * 10000.0f));
}
mission = Mission.LoadRandom(locations, rand);
}
public override void Start()
{
base.Start();
new GUIMessageBox(mission.Name, mission.Description, 400, 400);
Networking.GameServer.Log("Mission: " + mission.Name, Color.Cyan);
Networking.GameServer.Log(mission.Description, Color.Cyan);
}
}
}