1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

Fix Multiplayer Spawner freeing node after client disconnected Issue

This commit is contained in:
Daniel Snd
2024-05-25 13:34:33 -03:00
parent b7feebefab
commit 1a9d95f933

View File

@@ -76,7 +76,7 @@ void SceneCacheInterface::on_peer_change(int p_id, bool p_connected) {
for (KeyValue<int, ObjectID> E : pinfo->recv_nodes) { for (KeyValue<int, ObjectID> E : pinfo->recv_nodes) {
NodeCache *nc = nodes_cache.getptr(E.value); NodeCache *nc = nodes_cache.getptr(E.value);
ERR_CONTINUE(!nc); ERR_CONTINUE(!nc);
nc->recv_ids.erase(E.key); nc->recv_ids.erase(p_id);
} }
for (const ObjectID &oid : pinfo->sent_nodes) { for (const ObjectID &oid : pinfo->sent_nodes) {
NodeCache *nc = nodes_cache.getptr(oid); NodeCache *nc = nodes_cache.getptr(oid);