Revert "Physics (#3452)"

This reverts commit 3e64fd56a1.
This commit is contained in:
Pieter-Jan Briers
2021-02-28 18:49:48 +01:00
parent eddec5fcce
commit 1eb0fbd8d0
211 changed files with 2560 additions and 2600 deletions

View File

@@ -11,13 +11,14 @@ namespace Content.Client.GameObjects.Components.Movement
{
base.HandleComponentState(curState, nextState);
if (curState is not ClimbModeComponentState climbModeState)
if (curState is not ClimbModeComponentState climbModeState || Body == null)
{
return;
}
IsClimbing = climbModeState.Climbing;
OwnerIsTransitioning = climbModeState.IsTransitioning;
}
public override bool IsClimbing { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
#nullable enable
using Content.Shared.GameObjects.Components.Movement;
using Robust.Shared.GameObjects;
using Robust.Shared.Map;
namespace Content.Client.GameObjects.Components.Movement
{
[RegisterComponent]
[ComponentReference(typeof(IMoverComponent))]
public class PlayerInputMoverComponent : SharedPlayerInputMoverComponent
{
public override EntityCoordinates LastPosition { get; set; }
public override float StepSoundDistance { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Client.GameObjects.Components.Projectiles
{
[RegisterComponent]
public class ThrownItemComponent : ProjectileComponent
{
public override string Name => "ThrownItem";
public override uint? NetID => ContentNetIDs.THROWN_ITEM;
}
}

View File

@@ -6,7 +6,6 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
namespace Content.Client.GameObjects.Components.Suspicion
{
@@ -63,7 +62,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
continue;
}
if (!ally.TryGetComponent(out IPhysBody physics))
if (!ally.TryGetComponent(out IPhysicsComponent physics))
{
continue;
}
@@ -83,7 +82,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
continue;
}
var worldBox = physics.GetWorldAABB();
var worldBox = physics.WorldAABB;
// if not on screen, or too small, continue
if (!worldBox.Intersects(in viewport) || worldBox.IsEmpty())
@@ -91,7 +90,7 @@ namespace Content.Client.GameObjects.Components.Suspicion
continue;
}
var screenCoordinates = _eyeManager.WorldToScreen(physics.GetWorldAABB().TopLeft + (0, 0.5f));
var screenCoordinates = _eyeManager.WorldToScreen(physics.WorldAABB.TopLeft + (0, 0.5f));
DrawString(screen, _font, screenCoordinates, _traitorText, Color.OrangeRed);
}
}