Nullspace map entity is created every time the client joins the server. This fixes #520.
This commit is contained in:
@@ -173,6 +173,11 @@ namespace Content.Client
|
|||||||
{
|
{
|
||||||
_stateManager.RequestStateChange<GameScreen>();
|
_stateManager.RequestStateChange<GameScreen>();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_baseClient.PlayerJoinedServer += (sender, args) =>
|
||||||
|
{
|
||||||
|
IoCManager.Resolve<IMapManager>().CreateNewMapEntity(MapId.Nullspace);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -217,7 +222,6 @@ namespace Content.Client
|
|||||||
IoCManager.Resolve<IChatManager>().Initialize();
|
IoCManager.Resolve<IChatManager>().Initialize();
|
||||||
IoCManager.Resolve<ISandboxManager>().Initialize();
|
IoCManager.Resolve<ISandboxManager>().Initialize();
|
||||||
IoCManager.Resolve<IClientPreferencesManager>().Initialize();
|
IoCManager.Resolve<IClientPreferencesManager>().Initialize();
|
||||||
IoCManager.Resolve<IMapManager>().CreateNewMapEntity(MapId.Nullspace);
|
|
||||||
IoCManager.Resolve<IItemSlotManager>().Initialize();
|
IoCManager.Resolve<IItemSlotManager>().Initialize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using Content.Client.Interfaces.Parallax;
|
using Content.Client.Interfaces.Parallax;
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
using Robust.Client.Graphics.Drawing;
|
using Robust.Client.Graphics.Drawing;
|
||||||
using Robust.Client.Graphics.Overlays;
|
using Robust.Client.Graphics.Overlays;
|
||||||
@@ -52,7 +52,7 @@ namespace Content.Client.Parallax
|
|||||||
var screenHandle = (DrawingHandleScreen) handle;
|
var screenHandle = (DrawingHandleScreen) handle;
|
||||||
|
|
||||||
var (sizeX, sizeY) = _parallaxTexture.Size;
|
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);
|
var (ox, oy) = (Vector2i) new Vector2(-posX / Slowness, posY / Slowness);
|
||||||
ox = MathHelper.Mod(ox, sizeX);
|
ox = MathHelper.Mod(ox, sizeX);
|
||||||
oy = MathHelper.Mod(oy, sizeY);
|
oy = MathHelper.Mod(oy, sizeY);
|
||||||
|
|||||||
@@ -322,11 +322,7 @@ namespace Content.Server.GameTicking
|
|||||||
// FIXME: Actually, definitely.
|
// FIXME: Actually, definitely.
|
||||||
entity.Delete();
|
entity.Delete();
|
||||||
|
|
||||||
// Delete all maps outside of nullspace.
|
_mapManager.Restart();
|
||||||
foreach (var mapId in _mapManager.GetAllMapIds().ToList())
|
|
||||||
// TODO: Maybe something less naive here?
|
|
||||||
if (mapId != MapId.Nullspace)
|
|
||||||
_mapManager.DeleteMap(mapId);
|
|
||||||
|
|
||||||
// Delete the minds of everybody.
|
// Delete the minds of everybody.
|
||||||
// TODO: Maybe move this into a separate manager?
|
// TODO: Maybe move this into a separate manager?
|
||||||
|
|||||||
Submodule RobustToolbox updated: ae85645e23...6249ae8d0d
Reference in New Issue
Block a user