Skip to content

Commit

Permalink
fix predicted childs
Browse files Browse the repository at this point in the history
  • Loading branch information
RevenantX committed Dec 10, 2024
1 parent 6092ba8 commit ebdae8a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LiteEntitySystem/EntityLogic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public T AddPredictedEntity<T>(Action<T> initMethod = null) where T : EntityLogi
entity._predictedId.Value = _localPredictedIdCounter.Value++;
entity._parentId.Value = new EntitySharedReference(this);
entity.InternalOwnerId.Value = InternalOwnerId.Value;
Childs.Add(this);
Childs.Add(entity);
entity.OnOwnerChange(EntityManager.InternalPlayerId);
return entity;
}
Expand Down Expand Up @@ -196,7 +196,7 @@ public void AddPredictedEntity<T>(ref SyncVar<EntitySharedReference> targetRefer
entity = ClientManager.AddLocalEntity(initMethod);
entity._parentId.Value = new EntitySharedReference(this);
entity.InternalOwnerId.Value = InternalOwnerId.Value;
Childs.Add(this);
Childs.Add(entity);
entity.OnOwnerChange(EntityManager.InternalPlayerId);
targetReference.Value = entity;
}
Expand Down

0 comments on commit ebdae8a

Please sign in to comment.