Content update for NetEntities (#18935)
This commit is contained in:
@@ -38,7 +38,7 @@ public partial class SharedBodySystem
|
||||
|
||||
var prototype = Prototypes.Index<BodyPrototype>(body.Prototype);
|
||||
|
||||
if (!_netManager.IsClient || bodyId.IsClientSide())
|
||||
if (!_netManager.IsClient || IsClientSide(bodyId))
|
||||
InitBody(body, prototype);
|
||||
|
||||
Dirty(body); // Client doesn't actually spawn the body, need to sync it
|
||||
@@ -72,7 +72,12 @@ public partial class SharedBodySystem
|
||||
body.Root != null)
|
||||
return false;
|
||||
|
||||
slot = new BodyPartSlot(slotId, bodyId.Value, null);
|
||||
slot = new BodyPartSlot
|
||||
{
|
||||
Id = slotId,
|
||||
Parent = bodyId.Value,
|
||||
NetParent = GetNetEntity(bodyId.Value),
|
||||
};
|
||||
body.Root = slot;
|
||||
|
||||
return true;
|
||||
@@ -86,7 +91,13 @@ public partial class SharedBodySystem
|
||||
return;
|
||||
var bodyId = Spawn(root.Part, body.Owner.ToCoordinates());
|
||||
var partComponent = Comp<BodyPartComponent>(bodyId);
|
||||
var slot = new BodyPartSlot(root.Part, body.Owner, partComponent.PartType);
|
||||
var slot = new BodyPartSlot
|
||||
{
|
||||
Id = root.Part,
|
||||
Type = partComponent.PartType,
|
||||
Parent = body.Owner,
|
||||
NetParent = GetNetEntity(body.Owner),
|
||||
};
|
||||
body.Root = slot;
|
||||
partComponent.Body = bodyId;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user