diff --git a/Robust.Server/BaseServer.cs b/Robust.Server/BaseServer.cs index aa2268f0389..e4d4a0f5462 100644 --- a/Robust.Server/BaseServer.cs +++ b/Robust.Server/BaseServer.cs @@ -660,10 +660,14 @@ public void Cleanup() { // Write down exception log var logPath = _config.GetCVar(CVars.LogPath); - var relPath = PathHelpers.ExecutableRelativeFile(logPath); - Directory.CreateDirectory(relPath); - var pathToWrite = Path.Combine(relPath, + if (!Path.IsPathRooted(logPath)) + { + logPath = PathHelpers.ExecutableRelativeFile(logPath); + } + + var pathToWrite = Path.Combine(logPath, "Runtime-" + DateTime.Now.ToString("yyyy-MM-dd-THH-mm-ss") + ".txt"); + Directory.CreateDirectory(logPath); File.WriteAllText(pathToWrite, _runtimeLog.Display(), EncodingHelpers.UTF8); } diff --git a/Robust.Shared/Console/Commands/MapCommands.cs b/Robust.Shared/Console/Commands/MapCommands.cs index e0ff05b29f8..b9dfe0be647 100644 --- a/Robust.Shared/Console/Commands/MapCommands.cs +++ b/Robust.Shared/Console/Commands/MapCommands.cs @@ -131,6 +131,7 @@ public override void Execute(IConsoleShell shell, string argStr, string[] args) internal sealed class ListMapsCommand : LocalizedCommands { + [Dependency] private readonly IEntityManager _entManager = default!; [Dependency] private readonly IMapManager _map = default!; public override string Command => "lsmap"; @@ -144,10 +145,13 @@ public override void Execute(IConsoleShell shell, string argStr, string[] args) foreach (var mapId in _map.GetAllMapIds().OrderBy(id => id.Value)) { - msg.AppendFormat("{0}: init: {1}, paused: {2}, ent: {3}, grids: {4}\n", - mapId, _map.IsMapInitialized(mapId), + var mapUid = _map.GetMapEntityId(mapId); + + msg.AppendFormat("{0}: {1}, init: {2}, paused: {3}, nent: {4}, grids: {5}\n", + mapId, _entManager.GetComponent(mapUid).EntityName, + _map.IsMapInitialized(mapId), _map.IsMapPaused(mapId), - _map.GetMapEntityId(mapId), + _entManager.GetNetEntity(_map.GetMapEntityId(mapId)), string.Join(",", _map.GetAllGrids(mapId).Select(grid => grid.Owner))); } diff --git a/Robust.Shared/Physics/Dynamics/Contacts/ContactPositionConstraint.cs b/Robust.Shared/Physics/Dynamics/Contacts/ContactPositionConstraint.cs index f3f2cae0255..4d96a81801f 100644 --- a/Robust.Shared/Physics/Dynamics/Contacts/ContactPositionConstraint.cs +++ b/Robust.Shared/Physics/Dynamics/Contacts/ContactPositionConstraint.cs @@ -21,7 +21,6 @@ */ using System.Numerics; -using Robust.Shared.Maths; using Robust.Shared.Physics.Collision; namespace Robust.Shared.Physics.Dynamics.Contacts diff --git a/Robust.Shared/Physics/Dynamics/Contacts/ContactVelocityConstraint.cs b/Robust.Shared/Physics/Dynamics/Contacts/ContactVelocityConstraint.cs index 14e325e672a..a1e876c3bc1 100644 --- a/Robust.Shared/Physics/Dynamics/Contacts/ContactVelocityConstraint.cs +++ b/Robust.Shared/Physics/Dynamics/Contacts/ContactVelocityConstraint.cs @@ -21,7 +21,6 @@ */ using System.Numerics; -using Robust.Shared.Maths; namespace Robust.Shared.Physics.Dynamics.Contacts { diff --git a/Robust.Shared/Physics/Systems/SharedPhysicsSystem.Solver.cs b/Robust.Shared/Physics/Systems/SharedPhysicsSystem.Solver.cs index 5130a8e235d..d1b8d9b3df2 100644 --- a/Robust.Shared/Physics/Systems/SharedPhysicsSystem.Solver.cs +++ b/Robust.Shared/Physics/Systems/SharedPhysicsSystem.Solver.cs @@ -67,12 +67,8 @@ private void ResetSolver( velocityConstraint.TangentSpeed = contact.TangentSpeed; velocityConstraint.IndexA = bodyA.IslandIndex[island.Index]; velocityConstraint.IndexB = bodyB.IslandIndex[island.Index]; - velocityConstraint.Points = new VelocityConstraintPoint[2]; - - for (var j = 0; j < 2; j++) - { - velocityConstraint.Points[j] = new VelocityConstraintPoint(); - } + Array.Resize(ref velocityConstraint.Points, 2); + // Don't need to reset point data as it all gets set below. var (invMassA, invMassB) = GetInvMass(bodyA, bodyB); @@ -91,7 +87,7 @@ private void ResetSolver( (positionConstraint.InvMassA, positionConstraint.InvMassB) = (invMassA, invMassB); positionConstraint.LocalCenterA = bodyA.LocalCenter; positionConstraint.LocalCenterB = bodyB.LocalCenter; - positionConstraint.LocalPoints = new Vector2[2]; + Array.Resize(ref positionConstraint.LocalPoints, 2); positionConstraint.InvIA = bodyA.InvI; positionConstraint.InvIB = bodyB.InvI;