extends Node ## Client-side proxy node, attached at runtime as a Node named "Server" at the ## SceneTree root by NetworkClient. Exists purely so Godot's RPC path-matching ## finds a receiver for _receive_snapshot (the server calls it on its own root ## "Server" node, so the client needs a node at /root/Server declaring the same ## @rpc set). Not a real server. var owner_client: Node = null ## Must match scripts/server.gd's @rpc annotation on _receive_snapshot exactly. @rpc("any_peer", "call_remote", "reliable") func _receive_snapshot(snapshot_data: Dictionary) -> void: if owner_client and is_instance_valid(owner_client): owner_client._handle_snapshot(snapshot_data)