Skip to content

Commit 9768496

Browse files
committed
Finally working! (no undo obv)
1 parent 9e7d5c8 commit 9768496

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/multi_godot/multi_godot.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,8 @@ void MultiGodot::_sync_colab_scenes() {
631631
continue;
632632
}
633633

634-
Variant previous = previous_property_values.get(previous_property_names.find(info.name));
634+
int index = previous_property_names.find(info.name);
635+
Variant previous = previous_property_values.get(index);
635636
if (previous == current) {
636637
continue;
637638
}
@@ -656,6 +657,8 @@ void MultiGodot::_sync_colab_scenes() {
656657

657658
_call_func(this, "_apply_action", {action.type, action.node_path, action.new_path, action.new_name, action.property_path, action.new_value}, other_id);
658659
}
660+
661+
previous_property_values.set(index, current);
659662
}
660663
}
661664

@@ -967,7 +970,7 @@ void MultiGodot::_apply_action(int type, String node_path, String new_path, Stri
967970
Variant new_value) {
968971
if (type == Action::PROPERTY_EDIT) {
969972
Node *modified_on = EditorNode::get_singleton()->get_edited_scene()->get_node(node_path);
970-
if (!modified_on->get(property_path)) {
973+
if (modified_on->get_static_property_type(property_path) == Variant::NIL) {
971974
print_error("Tried to set property " + property_path + " on a node at path " + node_path + " but the property doesn't exist");
972975
return;
973976
}

0 commit comments

Comments
 (0)