summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-01-13 11:22:56 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-01-13 11:22:56 -0300
commit7c7ab30c4ef74f3e7a90ab6d23d69d545fac7cf3 (patch)
treec96e59671f1ae3a6b8696784f281db0193aaa2d7 /core
parent0a6f409323eda5d1ae2c968bbd482c8af1370466 (diff)
fixes
Diffstat (limited to 'core')
-rw-r--r--core/object_type_db.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp
index f7917b7418..1047d7eba5 100644
--- a/core/object_type_db.cpp
+++ b/core/object_type_db.cpp
@@ -847,8 +847,15 @@ void ObjectTypeDB::set_type_enabled(StringName p_type,bool p_enable) {
bool ObjectTypeDB::is_type_enabled(StringName p_type) {
- ERR_FAIL_COND_V(!types.has(p_type),false);
- return !types[p_type].disabled;
+ TypeInfo *ti=types.getptr(p_type);
+ if (!ti || !ti->creation_func) {
+ if (compat_types.has(p_type)) {
+ ti=types.getptr(compat_types[p_type]);
+ }
+ }
+
+ ERR_FAIL_COND_V(!ti,false);
+ return !ti->disabled;
}
StringName ObjectTypeDB::get_category(const StringName& p_node) {