(b8f75ee96) Fixed level inequality errors caused by 866621c. Accessing the level start/end location properties during level generation caused the seed of RandSync.Server to be changed. Now generating a new random location uses a new MTRandom instance and doesn't touch RandSync.Server.
This commit is contained in:
@@ -233,7 +233,8 @@ namespace Barotrauma
|
||||
|
||||
levelSeed = value;
|
||||
|
||||
backgroundSprite = LocationType.Random(levelSeed)?.GetPortrait(ToolBox.StringToInt(levelSeed));
|
||||
int intSeed = ToolBox.StringToInt(levelSeed);
|
||||
backgroundSprite = LocationType.Random(new MTRandom(intSeed))?.GetPortrait(intSeed);
|
||||
seedBox.Text = levelSeed;
|
||||
|
||||
//lastUpdateID++;
|
||||
|
||||
Reference in New Issue
Block a user