Skip to content

Commit

Permalink
fix primitive cubes being deleted by the batching system (part of #143)
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyOThan committed Sep 11, 2024
1 parent 719406e commit e59773a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions RasterPropMonitor/Auxiliary modules/PropBatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,10 @@ public override void OnLoad(ConfigNode node)
// just attach it to the internal model and remove the prop so we can avoid calling update etc.
if (keepProp && oldProp.internalModules.Count == 0)
{
var modelTransform = oldProp.transform.Find("model");
if (modelTransform != null)
var internalModelTransform = internalModel.transform.Find("model");
for (int i = oldProp.transform.childCount-1; i >= 0; i--)
{
modelTransform.SetParent(internalModel.transform.Find("model"), true);
oldProp.transform.GetChild(i).SetParent(internalModelTransform, true);
}

JUtil.LogMessage(null, "PROP_BATCH: removing prop {0} because it has no modules left", oldProp.propName);
Expand Down

0 comments on commit e59773a

Please sign in to comment.