diff options
author | Jaguar <killerjaguar26@gmail.com> | 2015-06-13 14:10:06 -0400 |
---|---|---|
committer | Jaguar <killerjaguar26@gmail.com> | 2015-06-13 14:10:06 -0400 |
commit | 7c0051beac315ad9c8896064d24ae362f5a65f7f (patch) | |
tree | 29d3529b1ee5eaab182f715bbf9fab7259ee9373 | |
parent | 4e46143499be0e40ae29eff550cbeec4ebde3d85 (diff) |
Fixed variables being set before calling the setter method
-rw-r--r-- | modules/gdscript/gd_script.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index ceca1ff2b9..70a5fd985c 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -2131,7 +2131,6 @@ bool GDInstance::set(const StringName& p_name, const Variant& p_value) { { const Map<StringName,GDScript::MemberInfo>::Element *E = script->member_indices.find(p_name); if (E) { - members[E->get().index]=p_value; if (E->get().setter) { const Variant *val=&p_value; Variant::CallError err; @@ -2140,6 +2139,8 @@ bool GDInstance::set(const StringName& p_name, const Variant& p_value) { return true; //function exists, call was successful } } + else + members[E->get().index] = p_value; return true; } } |