X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fmetascene.cc;h=ba5bdc2832cc85d22c2f66c0e33f32aa7911c2bc;hp=eef5e65120cb607d1238be9063f86c2645bf06ba;hb=f30d53755d1da9378a2e5c222135b5e3c92ff4b0;hpb=e5c3a6764a288f04cffbf02164fec7a2c2d80dea diff --git a/src/metascene.cc b/src/metascene.cc index eef5e65..ba5bdc2 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; + // also add a node to the mirror plane matching list + FlatMirror *m = new FlatMirror; + m->wplane = mir->wplane; + m->next = planes; planes = node; mir->objects.push_back(obj); objmirror[obj] = mir; // associate with object ++num_mirrors; } else { + node->objects.push_back(obj); delete mir; } }