@@ -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; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user