More miscellaneous compiler warning fixes (#18228)

This commit is contained in:
metalgearsloth
2023-07-23 16:03:57 +10:00
committed by GitHub
parent cfb827c99b
commit e755509fc7
12 changed files with 103 additions and 82 deletions

View File

@@ -40,6 +40,7 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab
private void Reset()
{
var entManager = IoCManager.Resolve<IEntityManager>();
var xformSystem = entManager.System<SharedTransformSystem>();
var playerManager = IoCManager.Resolve<IPlayerManager>();
var player = playerManager.LocalPlayer?.ControlledEntity;
@@ -50,16 +51,16 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab
if (entManager.TryGetComponent<TransformComponent>(player, out var xform))
{
currentMap = xform.MapID;
position = xform.WorldPosition;
position = xformSystem.GetWorldPosition(xform);
if (entManager.TryGetComponent<TransformComponent>(xform.GridUid, out var gridXform))
{
rotation = gridXform.WorldRotation;
rotation = xformSystem.GetWorldRotation(gridXform);
}
else
{
// MapId moment
rotation = xform.WorldRotation - xform.LocalRotation;
rotation = xformSystem.GetWorldRotation(xform) - xform.LocalRotation;
}
}