Merge pull request #7491 from BastiaanOlij/tools-no-fixes
Few small fixes so tools=no and target=release compiles
This commit is contained in:
commit
0507f87de9
4 changed files with 13 additions and 5 deletions
|
@ -113,15 +113,15 @@ protected:
|
||||||
|
|
||||||
#ifndef DEBUG_ENABLED
|
#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) {
|
_FORCE_INLINE_ void _remove_owner(RID& p_rid) {
|
||||||
|
|
||||||
return p_rid._owner=NULL;
|
p_rid._data->_owner=NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
#
|
#
|
||||||
|
|
|
@ -1695,12 +1695,16 @@ void BakedLight::create_debug_mesh(DebugMode p_mode) {
|
||||||
MultiMeshInstance *mmi = memnew( MultiMeshInstance );
|
MultiMeshInstance *mmi = memnew( MultiMeshInstance );
|
||||||
mmi->set_multimesh(mm);
|
mmi->set_multimesh(mm);
|
||||||
add_child(mmi);
|
add_child(mmi);
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
if (get_tree()->get_edited_scene_root()==this){
|
if (get_tree()->get_edited_scene_root()==this){
|
||||||
mmi->set_owner(this);
|
mmi->set_owner(this);
|
||||||
} else {
|
} else {
|
||||||
mmi->set_owner(get_owner());
|
mmi->set_owner(get_owner());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
mmi->set_owner(get_owner());
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1314,12 +1314,16 @@ void GIProbe::_create_debug_mesh(Baker *p_baker) {
|
||||||
MultiMeshInstance *mmi = memnew( MultiMeshInstance );
|
MultiMeshInstance *mmi = memnew( MultiMeshInstance );
|
||||||
mmi->set_multimesh(mm);
|
mmi->set_multimesh(mm);
|
||||||
add_child(mmi);
|
add_child(mmi);
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
if (get_tree()->get_edited_scene_root()==this){
|
if (get_tree()->get_edited_scene_root()==this){
|
||||||
mmi->set_owner(this);
|
mmi->set_owner(this);
|
||||||
} else {
|
} else {
|
||||||
mmi->set_owner(get_owner());
|
mmi->set_owner(get_owner());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
mmi->set_owner(get_owner());
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1777,9 +1777,9 @@ bool PackedScene::can_instance() const {
|
||||||
Node *PackedScene::instance(GenEditState p_edit_state) const {
|
Node *PackedScene::instance(GenEditState p_edit_state) const {
|
||||||
|
|
||||||
#ifndef TOOLS_ENABLED
|
#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_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
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue