-Some changes to how scenes and scripts are overriden in scene instance and inheritance

-Fixes #3127 and also properly fixes #2958
This commit is contained in:
Juan Linietsky 2016-01-23 21:42:15 -03:00
parent 6c27df8df6
commit a74138a0dc
3 changed files with 49 additions and 5 deletions

View file

@ -92,6 +92,22 @@ void ScriptServer::init_languages() {
}
}
void ScriptInstance::get_property_state(List<Pair<StringName, Variant> > &state) {
List<PropertyInfo> pinfo;
get_property_list(&pinfo);
for (List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) {
if (E->get().usage&PROPERTY_USAGE_STORAGE) {
Pair<StringName,Variant> p;
p.first=E->get().name;
if (get(p.first,p.second))
state.push_back(p);
}
}
}
Variant ScriptInstance::call(const StringName& p_method,VARIANT_ARG_DECLARE) {
VARIANT_ARGPTRS;