Skip to content

Commit ce26d48

Browse files
committed
Fix bug when copying proximity sensor
1 parent e2a7f5e commit ce26d48

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/tools/vrmlexp/prox.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1024,11 +1024,21 @@ ProxSensorObject::Clone(RemapDir &remap)
10241024
ts->objects.SetCount(objects.Count());
10251025
for (int i = 0; i < objects.Count(); i++)
10261026
{
1027+
10271028
if (remap.FindMapping(objects[i]->node))
10281029
ts->ReplaceReference(i + 1, remap.FindMapping(objects[i]->node));
10291030
else
10301031
ts->ReplaceReference(i + 1, objects[i]->node);
10311032
}
1033+
ts->objectsExit.SetCount(objectsExit.Count());
1034+
for (int i = 0; i < objectsExit.Count(); i++)
1035+
{
1036+
1037+
if (remap.FindMapping(objectsExit[i]->node))
1038+
ts->ReplaceReference(i + 1 + objects.Count(), remap.FindMapping(objectsExit[i]->node));
1039+
else
1040+
ts->ReplaceReference(i + 1 + objects.Count(), objects[i]->node);
1041+
}
10321042

10331043
BaseClone(this, ts, remap);
10341044
return ts;

0 commit comments

Comments
 (0)