Fix ThrownItemComponent's Thrower not being synced with the client.

- Fixes throwing banana peels making people become horizontal... On the client only.
This commit is contained in:
Vera Aguilera Puerto
2021-10-12 21:58:11 +02:00
parent 26c77a0d0b
commit 95c78020f6
4 changed files with 38 additions and 3 deletions

View File

@@ -1,12 +1,26 @@
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.GameStates;
using Robust.Shared.Serialization;
namespace Content.Shared.Throwing
{
[RegisterComponent]
[RegisterComponent, NetworkedComponent]
public class ThrownItemComponent : Component
{
public override string Name => "ThrownItem";
public IEntity? Thrower { get; set; }
}
[Serializable, NetSerializable]
public class ThrownItemComponentState : ComponentState
{
public EntityUid? Thrower { get; }
public ThrownItemComponentState(EntityUid? thrower)
{
Thrower = thrower;
}
}
}