Skip to content

Commit 70cfabf

Browse files
committed
handle EntitySlot entities again...
1 parent 64cf380 commit 70cfabf

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

NitroxClient/GameLogic/Spawning/WorldEntities/PrefabPlaceholderEntitySpawner.cs

+8
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,13 @@ private void SetupObject(WorldEntity entity, GameObject gameObject, GameObject p
7272
gameObject.transform.localScale = entity.Transform.LocalScale.ToUnity();
7373
gameObject.transform.SetParent(parent.transform, false);
7474
}
75+
76+
if (entity is PrefabPlaceholderEntity pEntity && pEntity.IsEntitySlotEntity && gameObject.TryGetComponent(out LargeWorldEntity lwe))
77+
{
78+
lwe.cellLevel = (LargeWorldEntity.CellLevel)pEntity.Level;
79+
bool enabled = LargeWorld.main.streamer.cellManager.RegisterEntity(lwe);
80+
81+
gameObject.SetActive(enabled);
82+
}
7583
}
7684
}

0 commit comments

Comments
 (0)