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