diff options
| author | Anton Yabchinskiy | 2015-11-02 20:25:01 +0300 |
|---|---|---|
| committer | Anton Yabchinskiy | 2015-11-02 20:25:01 +0300 |
| commit | 3b9868d2e44740c03861c64020a8b5d4d6da031d (patch) | |
| tree | 8ff5f9671122f946487848ce286d336c9b650c2c /modules/gdscript/gd_functions.cpp | |
| parent | dc8df8a91a995796f0f330bf6bb6b209f6dfce08 (diff) | |
| parent | b2f9acb8c96aed0505cbac21661e21e4acef710f (diff) | |
| download | godot-3b9868d2e44740c03861c64020a8b5d4d6da031d.tar.gz godot-3b9868d2e44740c03861c64020a8b5d4d6da031d.tar.zst godot-3b9868d2e44740c03861c64020a8b5d4d6da031d.zip | |
Merge branch 'master' of github.com:okamstudio/godot
Diffstat (limited to 'modules/gdscript/gd_functions.cpp')
| -rw-r--r-- | modules/gdscript/gd_functions.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/gdscript/gd_functions.cpp b/modules/gdscript/gd_functions.cpp index 37ddb2bc4..6f51ac531 100644 --- a/modules/gdscript/gd_functions.cpp +++ b/modules/gdscript/gd_functions.cpp @@ -904,6 +904,15 @@ void GDFunctions::call(Function p_func,const Variant **p_args,int p_arg_count,Va r_ret = gdscr->_new(NULL,0,r_error); + GDInstance *ins = static_cast<GDInstance*>(static_cast<Object*>(r_ret)->get_script_instance()); + Ref<GDScript> gd_ref = ins->get_script(); + + for(Map<StringName,GDScript::MemberInfo>::Element *E = gd_ref->member_indices.front(); E; E = E->next()) { + if(d.has(E->key())) { + ins->members[E->get().index] = d[E->key()]; + } + } + } break; case HASH: { |
