mirror of https://github.com/aap/librw.git
fixed frame hierarchy bugs
This commit is contained in:
parent
d92996c66d
commit
0f0147272c
|
@ -345,6 +345,7 @@ Camera::destroy(void)
|
||||||
s_plglist.destruct(this);
|
s_plglist.destruct(this);
|
||||||
assert(this->clump == nil);
|
assert(this->clump == nil);
|
||||||
assert(this->world == nil);
|
assert(this->world == nil);
|
||||||
|
this->setFrame(nil);
|
||||||
rwFree(this);
|
rwFree(this);
|
||||||
numAllocated--;
|
numAllocated--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,7 @@ Clump::clone(void)
|
||||||
atomic->setFrame(a->getFrame()->root);
|
atomic->setFrame(a->getFrame()->root);
|
||||||
clump->addAtomic(atomic);
|
clump->addAtomic(atomic);
|
||||||
}
|
}
|
||||||
root->purgeClone();
|
this->getFrame()->purgeClone();
|
||||||
|
|
||||||
// World extension
|
// World extension
|
||||||
if(this->world)
|
if(this->world)
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <assert.h>
|
||||||
|
|
||||||
#include "rwbase.h"
|
#include "rwbase.h"
|
||||||
#include "rwerror.h"
|
#include "rwerror.h"
|
||||||
|
@ -51,7 +52,6 @@ Frame::cloneHierarchy(void)
|
||||||
this->purgeClone();
|
this->purgeClone();
|
||||||
return frame;
|
return frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
Frame::destroy(void)
|
Frame::destroy(void)
|
||||||
{
|
{
|
||||||
|
@ -76,6 +76,7 @@ Frame::destroyHierarchy(void)
|
||||||
next = child->next;
|
next = child->next;
|
||||||
child->destroyHierarchy();
|
child->destroyHierarchy();
|
||||||
}
|
}
|
||||||
|
assert(this->objectList.isEmpty());
|
||||||
s_plglist.destruct(this);
|
s_plglist.destruct(this);
|
||||||
if(this->object.privateFlags & Frame::HIERARCHYSYNC)
|
if(this->object.privateFlags & Frame::HIERARCHYSYNC)
|
||||||
this->inDirtyList.remove();
|
this->inDirtyList.remove();
|
||||||
|
|
|
@ -69,6 +69,7 @@ Light::destroy(void)
|
||||||
s_plglist.destruct(this);
|
s_plglist.destruct(this);
|
||||||
assert(this->clump == nil);
|
assert(this->clump == nil);
|
||||||
assert(this->world == nil);
|
assert(this->world == nil);
|
||||||
|
this->setFrame(nil);
|
||||||
rwFree(this);
|
rwFree(this);
|
||||||
numAllocated--;
|
numAllocated--;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue