]> Shamusworld >> Repos - architektonas/blobdiff - src/container.cpp
Fixes to accomodate object connections.
[architektonas] / src / container.cpp
index 48e412a9dc29ee29eada20f753dfa5576a304156..a8cf0ad87ec45015ee5f0f73729ed7412b33a680 100644 (file)
@@ -67,7 +67,7 @@ Container & Container::operator=(const Container & from)
 {
        for(int i=0; i<(int)objects.size(); i++)
        {
-printf("Container: About to draw (object = $%X)\n", objects[i]);
+//printf("Container: About to draw (object = $%X)\n", objects[i]);
                objects[i]->Draw(painter);
        }
 }
@@ -152,8 +152,9 @@ Like so:
                {
                        if (objects[i]->Collided(point))
                        {
+#if 0
 Dimension * dimension = objects[i]->GetAttachedDimension();
-
+#endif
                                Object * objectToDelete = objects[i];
                                objects.erase(objects.begin() + i);     // Calls the destructor, (deletes the object, I presume... O_o) [NOPE! SURE DOESN'T!]
                                delete objectToDelete;
@@ -161,6 +162,7 @@ Dimension * dimension = objects[i]->GetAttachedDimension();
 // If this object had an attached dimension, reattach it to another object, if any...
 // The only problem with that approach is if the object it gets attached to is deleted,
 // it will call the dimension to use a NULL pointer and BLAMMO
+#if 0
 if (dimension)
 {
        Vector p1 = dimension->GetPoint1();
@@ -177,7 +179,7 @@ if (dimension)
                        dimension->SetPoint2(objectP2);
        }
 }
-
+#endif
                                // This only allows deleting objects one at a time...
                                break;
                                // however, this way of doing things could be problematic if we don't