summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
Diffstat (limited to 'scene')
-rw-r--r--scene/2d/particles_2d.cpp1
-rw-r--r--scene/3d/gi_probe.cpp1
-rw-r--r--scene/3d/particles.cpp1
-rw-r--r--scene/3d/soft_body.cpp1
-rw-r--r--scene/animation/skeleton_ik.cpp3
-rw-r--r--scene/main/scene_tree.cpp5
6 files changed, 7 insertions, 5 deletions
diff --git a/scene/2d/particles_2d.cpp b/scene/2d/particles_2d.cpp
index 7759897420..93c12f0103 100644
--- a/scene/2d/particles_2d.cpp
+++ b/scene/2d/particles_2d.cpp
@@ -410,6 +410,7 @@ Particles2D::Particles2D() {
particles = VS::get_singleton()->particles_create();
+ one_shot = false; // Needed so that set_emitting doesn't access uninitialized values
set_emitting(true);
set_one_shot(false);
set_amount(8);
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 414e932f61..a04f156d80 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -571,4 +571,5 @@ GIProbe::GIProbe() {
}
GIProbe::~GIProbe() {
+ VS::get_singleton()->free(gi_probe);
}
diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp
index 2bcd0eaa46..00a168fc39 100644
--- a/scene/3d/particles.cpp
+++ b/scene/3d/particles.cpp
@@ -411,6 +411,7 @@ Particles::Particles() {
particles = VS::get_singleton()->particles_create();
set_base(particles);
+ one_shot = false; // Needed so that set_emitting doesn't access uninitialized values
set_emitting(true);
set_one_shot(false);
set_amount(8);
diff --git a/scene/3d/soft_body.cpp b/scene/3d/soft_body.cpp
index a9d96292a1..b9f6865298 100644
--- a/scene/3d/soft_body.cpp
+++ b/scene/3d/soft_body.cpp
@@ -712,6 +712,7 @@ SoftBody::SoftBody() :
}
SoftBody::~SoftBody() {
+ PhysicsServer::get_singleton()->free(physics_rid);
}
void SoftBody::reset_softbody_pin() {
diff --git a/scene/animation/skeleton_ik.cpp b/scene/animation/skeleton_ik.cpp
index 43c4b2aa51..7a1b10792b 100644
--- a/scene/animation/skeleton_ik.cpp
+++ b/scene/animation/skeleton_ik.cpp
@@ -406,6 +406,7 @@ void SkeletonIK::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
skeleton = Object::cast_to<Skeleton>(get_parent());
+ set_process_priority(1);
reload_chain();
} break;
case NOTIFICATION_INTERNAL_PROCESS: {
@@ -431,8 +432,6 @@ SkeletonIK::SkeletonIK() :
skeleton(NULL),
target_node_override(NULL),
task(NULL) {
-
- set_process_priority(1);
}
SkeletonIK::~SkeletonIK() {
diff --git a/scene/main/scene_tree.cpp b/scene/main/scene_tree.cpp
index 0e7cec57a4..0940a59a82 100644
--- a/scene/main/scene_tree.cpp
+++ b/scene/main/scene_tree.cpp
@@ -453,9 +453,6 @@ void SceneTree::init() {
//_quit=false;
initialized = true;
- input_handled = false;
-
- pause = false;
root->_set_tree(this);
MainLoop::init();
@@ -1986,6 +1983,8 @@ SceneTree::SceneTree() {
idle_process_time = 1;
root = NULL;
+ input_handled = false;
+ pause = false;
current_frame = 0;
current_event = 0;
tree_changed_name = "tree_changed";