diff options
author | Fabio Alessandrelli <fabio.alessandrelli@gmail.com> | 2021-07-16 20:04:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-16 20:04:41 +0200 |
commit | 0e265b047e28a316c50c9d0fae64026de659ef43 (patch) | |
tree | c5c4778db4d5534bbe3a340b35231ede6c590986 | |
parent | 523d6b2ae834647a00199007c5903bc91872372f (diff) | |
parent | 74379b15ff7f534730557836be901e3c8a3cd2f8 (diff) |
Merge pull request #46554 from likeich/is_server_quiet_failure
MultiplayerAPI is_network_server Fails Silently
-rw-r--r-- | core/io/multiplayer_api.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/core/io/multiplayer_api.cpp b/core/io/multiplayer_api.cpp index 564397c88c..9f92388196 100644 --- a/core/io/multiplayer_api.cpp +++ b/core/io/multiplayer_api.cpp @@ -1068,9 +1068,7 @@ int MultiplayerAPI::get_network_unique_id() const { } bool MultiplayerAPI::is_network_server() const { - // XXX Maybe fail silently? Maybe should actually return true to make development of both local and online multiplayer easier? - ERR_FAIL_COND_V_MSG(!network_peer.is_valid(), false, "No network peer is assigned. I can't be a server."); - return network_peer->is_server(); + return network_peer.is_valid() && network_peer->is_server(); } void MultiplayerAPI::set_refuse_new_network_connections(bool p_refuse) { |