diff options
author | sheepandshepherd <sheepandshepherd@hotmail.com> | 2019-10-21 17:44:56 +0200 |
---|---|---|
committer | sheepandshepherd <sheepandshepherd@hotmail.com> | 2020-01-03 04:27:13 +0100 |
commit | 3056c4bd5acc4b5eda71303bf349e0d4f94a89c8 (patch) | |
tree | 87775b85c3e732a13a5fa813d0623537844bbbc6 /core/class_db.h | |
parent | 27b74f42b4fd6b6e56b7a4924697d8881488bee1 (diff) |
Expose cast_to to GDNative for dynamic casts
Diffstat (limited to 'core/class_db.h')
-rw-r--r-- | core/class_db.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/class_db.h b/core/class_db.h index 4129a74147..54f3e9e107 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -114,6 +114,7 @@ public: APIType api; ClassInfo *inherits_ptr; + void *class_ptr; HashMap<StringName, MethodBind *> method_map; HashMap<StringName, int> constant_map; HashMap<StringName, List<StringName> > enum_map; @@ -177,6 +178,7 @@ public: ERR_FAIL_COND(!t); t->creation_func = &creator<T>; t->exposed = true; + t->class_ptr = T::get_class_ptr_static(); T::register_custom_data_to_otdb(); } @@ -188,6 +190,7 @@ public: ClassInfo *t = classes.getptr(T::get_class_static()); ERR_FAIL_COND(!t); t->exposed = true; + t->class_ptr = T::get_class_ptr_static(); //nothing } @@ -206,6 +209,7 @@ public: ERR_FAIL_COND(!t); t->creation_func = &_create_ptr_func<T>; t->exposed = true; + t->class_ptr = T::get_class_ptr_static(); T::register_custom_data_to_otdb(); } |