mirror of
https://github.com/devZoGok/vb01.git
synced 2026-08-27 03:53:24 +00:00
nodes are dettached from parent befdre deletion
This commit is contained in:
@@ -25,8 +25,12 @@ namespace vb01{
|
||||
delete p;
|
||||
for(Text *t : texts)
|
||||
delete t;
|
||||
for(Node *c : children)
|
||||
for(Node *c : children){
|
||||
Node *par=c->getParent();
|
||||
if(par)
|
||||
par->dettachChild(c);
|
||||
delete c;
|
||||
}
|
||||
}
|
||||
|
||||
void Node::update(){
|
||||
@@ -35,12 +39,12 @@ namespace vb01{
|
||||
l->update();
|
||||
for(Mesh *m : meshes)
|
||||
m->update();
|
||||
for(ParticleEmitter *p : emitters)
|
||||
p->update();
|
||||
for(Text *t : texts)
|
||||
t->update();
|
||||
for(Node *c : children)
|
||||
c->update();
|
||||
for(ParticleEmitter *p : emitters)
|
||||
p->update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user