Add channel information to peer_packet signal in SceneMultiplayer#116708
Add channel information to peer_packet signal in SceneMultiplayer#116708SasaSuppenknecht wants to merge 6 commits intogodotengine:masterfrom
peer_packet signal in SceneMultiplayer#116708Conversation
peer_packet signal in SceneMultiplayer
The suggestion of a new signal would be the better option as this breaks compatibility in a pretty significant way, as there's no way to automatically adjust to changes to signals, and no editor warning or indication of the change |
Ah, makes sense. Then I will do as suggested in the initial proposal and add a new signal |
…echt/godot into peer_packet_channel
…echt/godot into peer_packet_channel
c1e4145 to
7c16989
Compare
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
This PR adds the channel information of a received packet to the peer_packet signal in SceneMultiplayer.
Previously, the signature was:
peer_packet(int id, PackedByteArray data)And now it is:
peer_packet(int id, PackedByteArray data, int channel)This PR is based on godotengine/godot-proposals#12907. The proposal suggests including a new signal for backwards compatibility, however, this kind of redundancy does not seem like a good fit for the engine. I also selected the channel information to be the last argument, as to be symmetrical to
SceneMultiplayer.send_bytes.