Add prediction for standing states and mob states (#1937)

This commit is contained in:
DrSmugleaf
2020-08-29 13:20:37 +02:00
committed by GitHub
parent 4d23bbf4df
commit 1ecf8aad1a
38 changed files with 1001 additions and 626 deletions

View File

@@ -1,7 +1,8 @@
using Content.Server.Mobs;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Mobs;
using Content.Shared.GameObjects.Components.Movement;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Systems;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Timers;
@@ -16,7 +17,7 @@ namespace Content.Server.GameObjects.Components.Mobs
protected override void OnKnockdown()
{
StandingStateHelper.Down(Owner);
EntitySystem.Get<StandingStateSystem>().Down(Owner);
}
public void CancelAll()
@@ -33,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Mobs
if (KnockedDown)
{
StandingStateHelper.Standing(Owner);
EntitySystem.Get<StandingStateSystem>().Standing(Owner);
}
KnockdownTimer = 0f;
@@ -58,7 +59,7 @@ namespace Content.Server.GameObjects.Components.Mobs
if (KnockdownTimer <= 0f)
{
StandingStateHelper.Standing(Owner);
EntitySystem.Get<StandingStateSystem>().Standing(Owner);
KnockdownTimer = 0f;
Dirty();