Content update for NetEntities (#18935)

This commit is contained in:
metalgearsloth
2023-09-11 09:42:41 +10:00
committed by GitHub
parent 389c8d1a2c
commit 5a0fc68be2
526 changed files with 3058 additions and 2215 deletions

View File

@@ -55,7 +55,7 @@ public sealed partial class ReplaySpectatorSystem
return;
}
if (!player.IsClientSide() || !HasComp<ReplaySpectatorComponent>(player))
if (!IsClientSide(player) || !HasComp<ReplaySpectatorComponent>(player))
{
// Player is trying to move -> behave like the ghost-on-move component.
SpawnSpectatorGhost(new EntityCoordinates(player, default), true);
@@ -113,12 +113,9 @@ public sealed partial class ReplaySpectatorSystem
_dir = dir;
}
public override bool HandleCmdMessage(ICommonSession? session, InputCmdMessage message)
public override bool HandleCmdMessage(IEntityManager entManager, ICommonSession? session, IFullInputCmdMessage message)
{
if (message is not FullInputCmdMessage full)
return false;
if (full.State == BoundKeyState.Down)
if (message.State == BoundKeyState.Down)
_sys.Direction |= _dir;
else
_sys.Direction &= ~_dir;