Content update for NetEntities (#18935)
This commit is contained in:
@@ -15,10 +15,10 @@ public sealed partial class PreventCollideComponent : Component
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class PreventCollideComponentState : ComponentState
|
||||
{
|
||||
public EntityUid Uid;
|
||||
public NetEntity Uid;
|
||||
|
||||
public PreventCollideComponentState(PreventCollideComponent component)
|
||||
public PreventCollideComponentState(NetEntity netEntity)
|
||||
{
|
||||
Uid = component.Uid;
|
||||
Uid = netEntity;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ public sealed class SharedPreventCollideSystem : EntitySystem
|
||||
|
||||
private void OnGetState(EntityUid uid, PreventCollideComponent component, ref ComponentGetState args)
|
||||
{
|
||||
args.State = new PreventCollideComponentState(component);
|
||||
args.State = new PreventCollideComponentState(GetNetEntity(component.Uid));
|
||||
}
|
||||
|
||||
private void OnHandleState(EntityUid uid, PreventCollideComponent component, ref ComponentHandleState args)
|
||||
@@ -25,7 +25,7 @@ public sealed class SharedPreventCollideSystem : EntitySystem
|
||||
if (args.Current is not PreventCollideComponentState state)
|
||||
return;
|
||||
|
||||
component.Uid = state.Uid;
|
||||
component.Uid = EnsureEntity<PreventCollideComponent>(state.Uid, uid);
|
||||
}
|
||||
|
||||
private void OnPreventCollide(EntityUid uid, PreventCollideComponent component, ref PreventCollideEvent args)
|
||||
|
||||
Reference in New Issue
Block a user