Add is_inside_tree() check to SpringBoneSimulator3D
This commit is contained in:
@ -1344,6 +1344,9 @@ void SpringBoneSimulator3D::_find_collisions() {
|
||||
}
|
||||
|
||||
void SpringBoneSimulator3D::_process_collisions() {
|
||||
if (!is_inside_tree()) {
|
||||
return;
|
||||
}
|
||||
for (const ObjectID &oid : collisions) {
|
||||
Object *t_obj = ObjectDB::get_instance(oid);
|
||||
if (!t_obj) {
|
||||
@ -1467,6 +1470,10 @@ void SpringBoneSimulator3D::_set_active(bool p_active) {
|
||||
}
|
||||
|
||||
void SpringBoneSimulator3D::_process_modification() {
|
||||
if (!is_inside_tree()) {
|
||||
return;
|
||||
}
|
||||
|
||||
Skeleton3D *skeleton = get_skeleton();
|
||||
if (!skeleton) {
|
||||
return;
|
||||
@ -1488,6 +1495,9 @@ void SpringBoneSimulator3D::_process_modification() {
|
||||
}
|
||||
|
||||
void SpringBoneSimulator3D::reset() {
|
||||
if (!is_inside_tree()) {
|
||||
return;
|
||||
}
|
||||
Skeleton3D *skeleton = get_skeleton();
|
||||
if (!skeleton) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user