mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +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
|
@ -194,7 +194,9 @@ public:
|
|||
void Receive(float min_time);
|
||||
void yieldToOtherThreads(float dtime);
|
||||
|
||||
PlayerSAO* StageTwoClientInit(session_t peer_id);
|
||||
// Full player initialization after they processed all static media
|
||||
// This is a helper function for TOSERVER_CLIENT_READY
|
||||
PlayerSAO *StageTwoClientInit(session_t peer_id);
|
||||
|
||||
/*
|
||||
* Command Handlers
|
||||
|
@ -626,7 +628,8 @@ private:
|
|||
|
||||
Call with env and con locked.
|
||||
*/
|
||||
PlayerSAO *emergePlayer(const char *name, session_t peer_id, u16 proto_version);
|
||||
std::unique_ptr<PlayerSAO> emergePlayer(const char *name, session_t peer_id,
|
||||
u16 proto_version);
|
||||
|
||||
/*
|
||||
Variables
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue