You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-23 15:16:17 +00:00
Fix MultiplayerSynchronizer peer visibility
This commit is contained in:
@@ -261,11 +261,11 @@ Error SceneReplicationInterface::_update_sync_visibility(int p_peer, Multiplayer
|
|||||||
if (p_peer == 0) {
|
if (p_peer == 0) {
|
||||||
for (KeyValue<int, PeerInfo> &E : peers_info) {
|
for (KeyValue<int, PeerInfo> &E : peers_info) {
|
||||||
// Might be visible to this specific peer.
|
// Might be visible to this specific peer.
|
||||||
is_visible = is_visible || p_sync->is_visible_to(E.key);
|
bool is_visible_to_peer = is_visible || p_sync->is_visible_to(E.key);
|
||||||
if (is_visible == E.value.sync_nodes.has(sid)) {
|
if (is_visible_to_peer == E.value.sync_nodes.has(sid)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (is_visible) {
|
if (is_visible_to_peer) {
|
||||||
E.value.sync_nodes.insert(sid);
|
E.value.sync_nodes.insert(sid);
|
||||||
} else {
|
} else {
|
||||||
E.value.sync_nodes.erase(sid);
|
E.value.sync_nodes.erase(sid);
|
||||||
|
|||||||
Reference in New Issue
Block a user