Levels are mirrored when traveling backwards through a connection in the campaign mode. Closes #519
This commit is contained in:
@@ -182,7 +182,7 @@ namespace Barotrauma
|
||||
StartRound(randomLevel, true, loadSecondSub);
|
||||
}
|
||||
|
||||
public void StartRound(Level level, bool reloadSub = true, bool loadSecondSub = false)
|
||||
public void StartRound(Level level, bool reloadSub = true, bool loadSecondSub = false, bool mirrorLevel = false)
|
||||
{
|
||||
#if CLIENT
|
||||
GameMain.LightManager.LosEnabled = GameMain.NetworkMember == null || GameMain.NetworkMember.CharacterInfo != null;
|
||||
@@ -210,11 +210,10 @@ namespace Barotrauma
|
||||
Submarine.MainSubs[1].Load(false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (level != null)
|
||||
{
|
||||
level.Generate();
|
||||
|
||||
level.Generate(mirrorLevel);
|
||||
submarine.SetPosition(submarine.FindSpawnPos(level.StartPosition - new Vector2(0.0f, 2000.0f)));
|
||||
}
|
||||
|
||||
@@ -229,9 +228,9 @@ namespace Barotrauma
|
||||
if (GameMode != null)
|
||||
{
|
||||
GameMode.MsgBox();
|
||||
if (GameMode is MultiPlayerCampaign campaign && GameMain.Server != null)
|
||||
if (GameMode is MultiPlayerCampaign mpCampaign && GameMain.Server != null)
|
||||
{
|
||||
campaign.CargoManager.CreateItems();
|
||||
mpCampaign.CargoManager.CreateItems();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user