summaryrefslogtreecommitdiff
path: root/scene/resources/packed_scene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/packed_scene.cpp')
-rw-r--r--scene/resources/packed_scene.cpp30
1 files changed, 7 insertions, 23 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index ac528e6659..c36480420b 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -375,7 +375,7 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
PackState ps;
ps.node=node;
ps.state=state;
- pack_state_stack.push_front(ps);
+ pack_state_stack.push_back(ps);
instanced_by_owner=false;
}
}
@@ -471,7 +471,6 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
}
}
#endif
- int subscene_prop_search_from=0;
// all setup, we then proceed to check all properties for the node
// and save the ones that are worth saving
@@ -479,8 +478,6 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
List<PropertyInfo> plist;
p_node->get_property_list(&plist);
- bool saved_script=false;
-
for (List<PropertyInfo>::Element *E=plist.front();E;E=E->next()) {
@@ -528,23 +525,8 @@ Error SceneState::_parse_node(Node *p_owner,Node *p_node,int p_parent_idx, Map<S
break;
}
}
-#if 0
-// this workaround ended up causing problems:
-https://github.com/godotengine/godot/issues/3127
- if (saved_script && exists && p_node->get_script_instance()) {
- //if this is an overriden value by another script, save it anyway
- //as the script change will erase it
- //https://github.com/godotengine/godot/issues/2958
-
- bool valid=false;
- p_node->get_script_instance()->get_property_type(name,&valid);
- if (valid) {
- exists=false;
- isdefault=false;
- }
- }
-#endif
+
if (exists) {
//check if already exists and did not change
@@ -556,6 +538,7 @@ https://github.com/godotengine/godot/issues/3127
if (Math::abs(a-b)<CMP_EPSILON)
continue;
} else if (bool(Variant::evaluate(Variant::OP_EQUAL,value,original))) {
+
continue;
}
}
@@ -575,9 +558,6 @@ https://github.com/godotengine/godot/issues/3127
}
}
- if (name=="script/script")
- saved_script=true;
-
NodeData::Property prop;
prop.name=_nm_get_string( name,name_map);
prop.value=_vm_get_variant( value, variant_map);
@@ -729,6 +709,7 @@ Error SceneState::_parse_connections(Node *p_owner,Node *p_node, Map<StringName,
List<MethodInfo> _signals;
p_node->get_signal_list(&_signals);
+ _signals.sort();
//ERR_FAIL_COND_V( !node_map.has(p_node), ERR_BUG);
//NodeData &nd = nodes[node_map[p_node]];
@@ -738,6 +719,9 @@ Error SceneState::_parse_connections(Node *p_owner,Node *p_node, Map<StringName,
List<Node::Connection> conns;
p_node->get_signal_connection_list(E->get().name,&conns);
+
+ conns.sort();
+
for(List<Node::Connection>::Element *F=conns.front();F;F=F->next()) {
const Node::Connection &c = F->get();