[MP] Fix "on change" indexed properties

Watchers were still using Object::get instead of Object::get_indexed.
This commit is contained in:
Fabio Alessandrelli 2023-10-13 16:43:30 +02:00
parent 51f81e1c88
commit 9d44954a3f

View file

@ -382,7 +382,7 @@ Error MultiplayerSynchronizer::_watch_changes(uint64_t p_usec) {
bool valid = false;
const Object *obj = _get_prop_target(node, prop);
ERR_CONTINUE_MSG(!obj, vformat("Node not found for property '%s'.", prop));
Variant v = obj->get(prop.get_concatenated_subnames(), &valid);
Variant v = obj->get_indexed(prop.get_subnames(), &valid);
ERR_CONTINUE_MSG(!valid, vformat("Property '%s' not found.", prop));
Watcher &w = ptr[idx];
if (w.prop != prop) {