mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
Adapt tutorial hyperlinks after godotengine/godot#24640
This commit is contained in:
@@ -129,7 +129,7 @@ Server and Clients:
|
||||
The above signals are called on every peer connected to the server (including on the server) when a new peer connects or disconnects.
|
||||
Clients will connect with a unique ID greater than 1, while network peer ID 1 is always the server.
|
||||
Anything below 1 should be handled as invalid.
|
||||
You can retrieve the ID for the local system via :ref:`SceneTree.get_network_unique_id() <class_SceneTree_get_network_unique_id>`.
|
||||
You can retrieve the ID for the local system via :ref:`SceneTree.get_network_unique_id() <class_SceneTree_method_get_network_unique_id>`.
|
||||
These IDs will be useful mostly for lobby management and should generally be stored as they identify connected peers and thus players. You can also use IDs to send messages only to certain peers.
|
||||
|
||||
Clients:
|
||||
@@ -347,9 +347,9 @@ The network master of a node is the peer that has the ultimate authority over it
|
||||
When not explicitly set the network master is inherited from the parent node, which if not changed is always going to be the server (ID 1). Thus the server has authority over all nodes by default.
|
||||
|
||||
The network master can be set
|
||||
with the function :ref:`Node.set_network_master(id, recursive) <class_Node_set_network_master>` (recursive is true by default and means the network master is recursively set on all child nodes of the node as well).
|
||||
with the function :ref:`Node.set_network_master(id, recursive) <class_Node_method_set_network_master>` (recursive is true by default and means the network master is recursively set on all child nodes of the node as well).
|
||||
|
||||
Checking that a specific node instance on a peer is the network master for this node for all connected peers is done by calling :ref:`Node.is_network_master() <class_Node_is_network_master>`. This will return true when executed on the server and false on all client peers.
|
||||
Checking that a specific node instance on a peer is the network master for this node for all connected peers is done by calling :ref:`Node.is_network_master() <class_Node_method_is_network_master>`. This will return true when executed on the server and false on all client peers.
|
||||
|
||||
If you have paid attention to the previous example, it's possible you noticed that the local peer is set to have network master authority for their own player instead of the server:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user