Fix docs on multiplayer peer signals.

NetworkedMultiplayerPeerENet emits peer_connected and peer_disconnected
on both the client and the server:
6fed1ffa31/modules/enet/networked_multiplayer_enet.cpp (L268)

When trying to implement `NetworkedMultiplayerCustom`, I followed the
documentation and only emitted this signal on the server.
I ended up getting errors like:

```
Invalid packet received. Unabled to find requested cached node
```

While I didn't check other peer implementations, it seems that emitting
on both the client and server is required.

I copied the wording from the `master` branch documentation.

Here's some output from a test program with all the signals connected:
```
1948301815 got multiplayer.network_peer_connected from  1
1948301815 got peer.peer_connected from 1
1948301815 got multiplayer.connected_to_server
1948301815 got peer.connection_succeeded
1413532890 got multiplayer.network_peer_connected from  1
1413532890 got peer.peer_connected from 1
1413532890 got multiplayer.connected_to_server
1413532890 got peer.connection_succeeded
1 got multiplayer.network_peer_connected from  1413532890
1 got peer.peer_connected from 1413532890
1 got multiplayer.network_peer_connected from  1948301815
1 got peer.peer_connected from 1948301815
1413532890 got multiplayer.network_peer_connected from  1948301815
1413532890 got peer.peer_connected from 1948301815
1948301815 got multiplayer.network_peer_connected from  1413532890
1948301815 got peer.peer_connected from 1413532890
1 got multiplayer.network_peer_disconnected from  1948301815
1 got peer.peer_disconnected from 1948301815
1413532890 got multiplayer.network_peer_disconnected from  1948301815
1413532890 got peer.peer_disconnected from 1948301815
1 got multiplayer.network_peer_disconnected from  1413532890
1 got peer.peer_disconnected from 1413532890
```
This commit is contained in:
Ryan Roden-Corrent 2023-02-25 13:22:29 -05:00
parent e90ac4b0e7
commit c3d9cc7068
No known key found for this signature in database
GPG key ID: 4E5072F68872BC04

View file

@ -67,13 +67,13 @@
<signal name="peer_connected">
<argument index="0" name="id" type="int" />
<description>
Emitted by the server when a client connects.
Emitted when a remote peer connects.
</description>
</signal>
<signal name="peer_disconnected">
<argument index="0" name="id" type="int" />
<description>
Emitted by the server when a client disconnects.
Emitted when a remote peer has disconnected.
</description>
</signal>
<signal name="server_disconnected">