Skip to content

Commit 64cf380

Browse files
committed
Fixed Placement Bug
Fixed floating stones
1 parent 50ce0ce commit 64cf380

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

NitroxClient/GameLogic/Spawning/WorldEntities/PlaceholderGroupWorldEntitySpawner.cs

+5
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,11 @@ public IEnumerator SpawnAsync(WorldEntity entity, Optional<GameObject> parent, E
121121
}
122122
}
123123

124+
if (prefabPlaceholderGroup.OnPrefabGroupSpawned != null) // Handles setting isKinematic on Floating Stones
125+
{
126+
prefabPlaceholderGroup.OnPrefabGroupSpawned();
127+
}
128+
124129
result.Set(prefabPlaceholderGroupGameObject);
125130
}
126131

NitroxClient/GameLogic/Spawning/WorldEntities/PrefabPlaceholderEntitySpawner.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,14 @@ private bool VerifyCanSpawnOrError(WorldEntity entity, Optional<GameObject> pare
5858
return true;
5959
}
6060

61-
Log.Error($"[{nameof(PrefabPlaceholderEntitySpawner)}] Can't find a {nameof(PrefabPlaceholdersGroup)} on parent for {entity.Id}");
61+
Log.Error($"[{nameof(PrefabPlaceholderEntitySpawner)}] Can't find a {nameof(PrefabPlaceholdersGroup)} on parent: {parent}\n for: {entity}");
6262
placeholder = null;
6363
return false;
6464
}
6565

6666
private void SetupObject(WorldEntity entity, GameObject gameObject, GameObject parent)
6767
{
68-
if (entity is PrefabPlaceholderEntity prefabEntity && !prefabEntity.IsEntitySlotEntity && parent)
68+
if (parent)
6969
{
7070
gameObject.transform.localPosition = entity.Transform.LocalPosition.ToUnity();
7171
gameObject.transform.localRotation = entity.Transform.LocalRotation.ToUnity();

0 commit comments

Comments
 (0)