Kyle
f218e9e929
MultiplayerAPI is_network_server Fails Silently
...
Removes the error message when the network peer is not valid and returns false instead.
This makes it simpler to make games that are both on/offline by replacing server checks of
'''
if is_instance_valid(get_tree().network_peer) and get_tree().is_network_server():
# Do server things
'''
with
'''
if get_tree().is_network_server():
# Do server things
'''
Requires no changes to the docs because both the MultiplayerAPI and SceneTree docs don't mention the error.
(cherry picked from commit 74379b15ff )
2021-07-20 13:05:13 +02:00
..
2021-07-13 12:13:01 +02:00
2021-05-14 12:20:31 +03:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-04 16:30:23 +02:00
2021-01-13 16:17:06 +01:00
2021-05-16 17:52:31 +02:00
2021-05-16 17:52:31 +02:00
2021-06-07 22:36:07 +02:00
2021-05-16 17:52:31 +02:00
2021-06-07 22:36:07 +02:00
2021-05-16 17:52:31 +02:00
2021-05-16 17:52:31 +02:00
2021-05-16 17:52:31 +02:00
2021-05-16 17:52:31 +02:00
2021-05-22 17:36:16 +03:00
2021-05-24 12:56:41 +02:00
2021-05-16 17:52:31 +02:00
2021-07-13 10:20:03 +02:00
2021-05-04 14:45:16 +02:00
2021-06-16 11:56:25 +01:00
2021-05-04 16:30:23 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-06-16 11:56:25 +01:00
2021-06-09 12:06:46 +07:00
2021-06-17 12:47:53 +02:00
2021-06-17 12:47:53 +02:00
2021-06-13 19:18:09 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-07-20 13:05:13 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-04 14:45:16 +02:00
2021-05-04 14:45:16 +02:00
2021-05-04 16:30:23 +02:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-16 17:52:31 +02:00
2021-05-16 17:52:31 +02:00
2021-06-18 12:57:59 +01:00
2021-05-04 16:30:23 +02:00
2021-06-16 11:56:25 +01:00
2021-05-04 16:30:23 +02:00
2021-06-16 11:56:25 +01:00
2021-05-05 15:02:01 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2020-06-10 15:30:52 +02:00
2021-05-05 15:02:01 +02:00
2021-01-13 16:17:06 +01:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 14:45:16 +02:00
2021-05-05 15:02:01 +02:00
2021-05-04 16:30:23 +02:00
2021-05-05 15:02:01 +02:00
2021-01-13 16:17:06 +01:00
2021-06-03 11:44:47 +02:00
2021-06-03 11:44:47 +02:00
2021-05-16 17:52:31 +02:00
2021-01-13 16:17:06 +01:00