diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-01-21 20:46:32 +0100 |
---|---|---|
committer | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2020-01-21 20:46:32 +0100 |
commit | 50f1b035b89ab8c4559620e12ab55cf7458fc291 (patch) | |
tree | 5d0e0e62649b0ba4282f124a22c37f614b7237d0 /modules | |
parent | 4d052e51a203e013cc6572bba4b05661e78d270b (diff) |
Fix MultiplayerAPI crash when peer impl misbehave.
Also fix WebSocketMultiplayer::get_available_packet_count() return value
when peer is not configured to use the multiplayer API.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/websocket/websocket_multiplayer_peer.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/websocket/websocket_multiplayer_peer.cpp b/modules/websocket/websocket_multiplayer_peer.cpp index b639c635fd..27ea50b524 100644 --- a/modules/websocket/websocket_multiplayer_peer.cpp +++ b/modules/websocket/websocket_multiplayer_peer.cpp @@ -98,7 +98,7 @@ void WebSocketMultiplayerPeer::_bind_methods() { // int WebSocketMultiplayerPeer::get_available_packet_count() const { - ERR_FAIL_COND_V_MSG(!_is_multiplayer, ERR_UNCONFIGURED, "Please use get_peer(ID).get_available_packet_count to get available packet count from peers when not using the MultiplayerAPI."); + ERR_FAIL_COND_V_MSG(!_is_multiplayer, 0, "Please use get_peer(ID).get_available_packet_count to get available packet count from peers when not using the MultiplayerAPI."); return _incoming_packets.size(); } |