X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fmetascene.cc;h=465decf2934a5965aed23aaf04cfd99089590776;hp=eef5e65120cb607d1238be9063f86c2645bf06ba;hb=04e3ba9a85209eb83100c83118f0db5dece1788f;hpb=e5c3a6764a288f04cffbf02164fec7a2c2d80dea diff --git a/src/metascene.cc b/src/metascene.cc index eef5e65..465decf 100644 --- a/src/metascene.cc +++ b/src/metascene.cc @@ -275,15 +275,17 @@ int MetaScene::calc_mirror_planes() mir->next = mirrors; mirrors = mir; - node = new FlatMirror; - node->wplane = mir->wplane; - node->next = planes; - planes = node; + // also add a node to the mirror plane matching list + FlatMirror *m = new FlatMirror; + m->wplane = mir->wplane; + m->next = planes; + planes = m; mir->objects.push_back(obj); objmirror[obj] = mir; // associate with object ++num_mirrors; } else { + node->objects.push_back(obj); delete mir; } }