diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index 478c76e952..a7ea6d594c 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -173,6 +173,11 @@ namespace Content.Client { _stateManager.RequestStateChange(); }; + + _baseClient.PlayerJoinedServer += (sender, args) => + { + IoCManager.Resolve().CreateNewMapEntity(MapId.Nullspace); + }; } /// @@ -217,7 +222,6 @@ namespace Content.Client IoCManager.Resolve().Initialize(); IoCManager.Resolve().Initialize(); IoCManager.Resolve().Initialize(); - IoCManager.Resolve().CreateNewMapEntity(MapId.Nullspace); IoCManager.Resolve().Initialize(); } diff --git a/Content.Client/Parallax/ParallaxOverlay.cs b/Content.Client/Parallax/ParallaxOverlay.cs index 9cf22e0dfa..5e24ac4a98 100644 --- a/Content.Client/Parallax/ParallaxOverlay.cs +++ b/Content.Client/Parallax/ParallaxOverlay.cs @@ -1,4 +1,4 @@ -using Content.Client.Interfaces.Parallax; +using Content.Client.Interfaces.Parallax; using Robust.Client.Graphics; using Robust.Client.Graphics.Drawing; using Robust.Client.Graphics.Overlays; @@ -52,7 +52,7 @@ namespace Content.Client.Parallax var screenHandle = (DrawingHandleScreen) handle; var (sizeX, sizeY) = _parallaxTexture.Size; - var (posX, posY) = _eyeManager.ScreenToWorld(Vector2.Zero).ToWorld(_mapManager).Position; + var (posX, posY) = _eyeManager.ScreenToMap(Vector2.Zero).Position; var (ox, oy) = (Vector2i) new Vector2(-posX / Slowness, posY / Slowness); ox = MathHelper.Mod(ox, sizeX); oy = MathHelper.Mod(oy, sizeY); diff --git a/Content.Server/GameTicking/GameTicker.cs b/Content.Server/GameTicking/GameTicker.cs index 841bacee35..d899b73156 100644 --- a/Content.Server/GameTicking/GameTicker.cs +++ b/Content.Server/GameTicking/GameTicker.cs @@ -322,11 +322,7 @@ namespace Content.Server.GameTicking // FIXME: Actually, definitely. entity.Delete(); - // Delete all maps outside of nullspace. - foreach (var mapId in _mapManager.GetAllMapIds().ToList()) - // TODO: Maybe something less naive here? - if (mapId != MapId.Nullspace) - _mapManager.DeleteMap(mapId); + _mapManager.Restart(); // Delete the minds of everybody. // TODO: Maybe move this into a separate manager? diff --git a/RobustToolbox b/RobustToolbox index ae85645e23..6249ae8d0d 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit ae85645e23b2022d508d265ba4cd9642dd1b5569 +Subproject commit 6249ae8d0dc9f54847b1c8fd3229472e584e9c43