summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-01-10 15:31:03 +0100
committerGitHub <noreply@github.com>2017-01-10 15:31:03 +0100
commit0507f87de9127062d2df9d5fcfdfdc43d7848c45 (patch)
treea89960019e5c8231dc129b13adf7eab82aac008d
parent82ea31e42a5ab05ce252323890c3b49efcec9c93 (diff)
parentbf990b0822c1b5a09f9584ed7c2b83edecabf375 (diff)
Merge pull request #7491 from BastiaanOlij/tools-no-fixes
Few small fixes so tools=no and target=release compiles
-rw-r--r--core/rid.h6
-rw-r--r--scene/3d/baked_light_instance.cpp4
-rw-r--r--scene/3d/gi_probe.cpp4
-rw-r--r--scene/resources/packed_scene.cpp4
4 files changed, 13 insertions, 5 deletions
diff --git a/core/rid.h b/core/rid.h
index 466e922968..8dc535c9c1 100644
--- a/core/rid.h
+++ b/core/rid.h
@@ -113,15 +113,15 @@ protected:
#ifndef DEBUG_ENABLED
- _FORCE_INLINE_ bool _is_owner(RID& p_rid) const {
+ _FORCE_INLINE_ bool _is_owner(const RID& p_rid) const {
- return this==p_rid._owner;
+ return this==p_rid._data->_owner;
}
_FORCE_INLINE_ void _remove_owner(RID& p_rid) {
- return p_rid._owner=NULL;
+ p_rid._data->_owner=NULL;
}
#
diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp
index f85dfea80e..19be12ed91 100644
--- a/scene/3d/baked_light_instance.cpp
+++ b/scene/3d/baked_light_instance.cpp
@@ -1695,12 +1695,16 @@ void BakedLight::create_debug_mesh(DebugMode p_mode) {
MultiMeshInstance *mmi = memnew( MultiMeshInstance );
mmi->set_multimesh(mm);
add_child(mmi);
+#ifdef TOOLS_ENABLED
if (get_tree()->get_edited_scene_root()==this){
mmi->set_owner(this);
} else {
mmi->set_owner(get_owner());
}
+#else
+ mmi->set_owner(get_owner());
+#endif
}
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp
index 5b51273d0e..438be13394 100644
--- a/scene/3d/gi_probe.cpp
+++ b/scene/3d/gi_probe.cpp
@@ -1314,12 +1314,16 @@ void GIProbe::_create_debug_mesh(Baker *p_baker) {
MultiMeshInstance *mmi = memnew( MultiMeshInstance );
mmi->set_multimesh(mm);
add_child(mmi);
+#ifdef TOOLS_ENABLED
if (get_tree()->get_edited_scene_root()==this){
mmi->set_owner(this);
} else {
mmi->set_owner(get_owner());
}
+#else
+ mmi->set_owner(get_owner());
+#endif
}
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index b0161f6898..625cc6a596 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1777,9 +1777,9 @@ bool PackedScene::can_instance() const {
Node *PackedScene::instance(GenEditState p_edit_state) const {
#ifndef TOOLS_ENABLED
- if (p_gen_edit_state) {
+ if (p_edit_state!=GEN_EDIT_STATE_DISABLED) {
ERR_EXPLAIN("Edit state is only for editors, does not work without tools compiled");
- ERR_FAIL_COND_V(p_gen_edit_state,NULL);
+ ERR_FAIL_COND_V(p_edit_state!=GEN_EDIT_STATE_DISABLED,NULL);
}
#endif