add 'is_offline_peer' function to MultiplayerAPI#75121
add 'is_offline_peer' function to MultiplayerAPI#75121ana-rchy wants to merge 2 commits intogodotengine:masterfrom
Conversation
|
Thanks! We do need some way to tell if we're really offline, since we'll now always have a Maybe we could change the behavior of From GDScript, maybe we could recommend |
|
didnt realize |
I agree! I'm just not sure a new virtual method is the right way to do it. I'd love to hear @Faless' and other members of the network team's opinions, though!
We already have |
|
even if you were to aim to change if we can figure out what causes the errors when making |
Oh, no, I'm not suggesting using
I was trying to say that I don't think this behavior adds value, because we already have bool is_offline_peer() const { return get_connection_status() != CONNECTION_CONNECTED; }The approach to this overall problem that I personally like the best (again, we need some input from the networking team - this is just my opinion :-)) is changing Perhaps, I'll make an alternative PR with this approach so they can both be evaluated... |
|
I made the alternative PR described above to facilitate discussion: #75185 |
|
This can be checked via:
```gdscript
multiplayer.multiplayer_peer is OfflineMultiplayerPeer
```
There is no need to add a method to the interface.
…On Sun, Mar 19, 2023, 19:52 David Snopek ***@***.***> wrote:
@dsnopek <https://github.com/dsnopek> requested review from
@godotengine/network on: #75121
<#75121> add 'is_offline_peer'
function to MultiplayerAPI.
—
Reply to this email directly, view it on GitHub
<#75121 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAM4C3R22KUJD5MAD2BBHGDW47A7HANCNFSM6AAAAAAWAMRSRM>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
|
I think the idea of whether or not a peer is "remote" would be better as far as eliminating the epistemological collisions arising from the notion of an "offline" peer. |
addresses #75049
to-do: add documentation for function
might be a good idea to remove/deprecate
has_multiplayer_peeras it will only ever return true