godotengine / godotengine/godot

[MP] Path simplification does not take visibility into account

Open
#97,690 5 comments 3 reactions 0 assignees View on GitHub
bug topic:multiplayer
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

4.3 dev 2

### System information

Windows 10 Godot 4.3 dev 2 Vulkan

### Issue description

Currently, when you would join into a game as a client with host having some nodes considered to be invisible for the client - you are going to get path simplification trying to access missing node.

### Steps to reproduce

1. Start server as host
2. Create a node that inherits from `MultiplayerSynchronizer`
3. Spawn said node with `MultiplayerSpawner`
4. Set its public visibility to `false`
5. Try joining as a client
6. Since this node is *not* going to be spawned by `MultiplayerSpawner` due to visibility influenced by `MultiplayerSynchronizer`, network cache would still try to send node path simplification for a node that does not exist on client, resulting in errors:
![image](https://github.com/user-attachments/assets/f5cde716-e017-46e4-b1fc-379deab7dbc4)

### Minimal reproduction project (MRP)

...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.