From: Luke D. <cod...@ho...> - 2002-07-13 09:36:10
|
Here's my guess: void manager_add_child(int parent, int child) { manager_object_data[child].index = managed_objects[parent]->add_child(managed_objects[child]); manager_object_data[child].parent = parent; } int Object::add_child(Object *this_object) { objects.push_back(*this_object); return numobjects++; } It looks like you are storing a *copy* of this_object in the 'objects' vector, so the object rendered is different to the one manipulated by the Lua script (managed_objects[child]). Luke Dunstan ----- Original Message ----- From: "Philip Bock" <ph...@fl...> To: <min...@li...> Sent: Tuesday, July 09, 2002 2:38 AM Subject: Re: [Mingw-users] Variables changing values strangely > I've tried GDB on a number of occasions, but I've never been able to get > anything useful out of it. Probably I just need more experience. If anyone > wants to take a look, I've uploaded the source to > http://www.flamewars.org/~phil/Rect-src.zip . The file Readme-bug.txt in the > zip file describes the problem in detail. > > Thanks, Philip Bock > |