Page 1 of 1

Additional events around connect_to_server

Posted: Tue Jul 30, 2019 8:10 am
by Godmave
New events "on_connect_to_server_accept" and "on_connect_to_server_decline":

Called when the user accepts or declines the request to change servers.
Use-case:
In a future version people will be able to ride trains to other servers. For that a request to change servers will be issued after the train gets teleported away.
If the user declines the server change he will get spawned next to where the train was removed.
If the user accepts the server change the target node will be informed that it is supposed to teleport the user into that train on spawn.

Bonus objective:
Add an optional information to on_player_left_game and on_pre_player_left_game:
changed_server::bool
and/or
changed_to_server::table of connect_to_server parameters