mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-27 17:28:41 +00:00
Reorder client initialization (#15554)
Previously, ServerEnv created a player instance before they're fully initialized. This commit moves all initialization steps and callbacks into TOSERVER_CLIENT_READY ^ which includes StageTwoClientInit for player loading or creation
This commit is contained in:
parent
c49ff76955
commit
d1dd044455
5 changed files with 41 additions and 40 deletions
|
@ -240,8 +240,7 @@ public:
|
|||
// Save players
|
||||
void saveLoadedPlayers(bool force = false);
|
||||
void savePlayer(RemotePlayer *player);
|
||||
PlayerSAO *loadPlayer(RemotePlayer *player, bool *new_player, session_t peer_id,
|
||||
bool is_singleplayer);
|
||||
std::unique_ptr<PlayerSAO> loadPlayer(RemotePlayer *player, session_t peer_id);
|
||||
void addPlayer(RemotePlayer *player);
|
||||
void removePlayer(RemotePlayer *player);
|
||||
bool removePlayerFromDatabase(const std::string &name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue