mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-23 17:47:17 +01:00
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:
parent
7579d990c1
commit
2a8d12ad59
@ -72,13 +72,13 @@
|
|||||||
<signal name="peer_connected">
|
<signal name="peer_connected">
|
||||||
<argument index="0" name="id" type="int" />
|
<argument index="0" name="id" type="int" />
|
||||||
<description>
|
<description>
|
||||||
Emitted by the server when a client connects.
|
Emitted when a remote peer connects.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="peer_disconnected">
|
<signal name="peer_disconnected">
|
||||||
<argument index="0" name="id" type="int" />
|
<argument index="0" name="id" type="int" />
|
||||||
<description>
|
<description>
|
||||||
Emitted by the server when a client disconnects.
|
Emitted when a remote peer has disconnected.
|
||||||
</description>
|
</description>
|
||||||
</signal>
|
</signal>
|
||||||
<signal name="server_disconnected">
|
<signal name="server_disconnected">
|
||||||
|
Loading…
Reference in New Issue
Block a user