mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 07:47:13 +00:00
fix(world): a player's client reloading the zone gets its character and the world again
A client that loads the zone again while its player is in the world (the Happy Flower editor reloads the zone in place) sent LEVEL_LOAD_COMPLETE a second time; LoadPlayer returned at once because the player existed, so the client waited forever. Now the server resends the character (CreateCharacter, ServerStates), forgets what it had sent that client, constructs every object again and sends the done-loading sequence at the player's current place. A first load is unchanged. The Happy Flower editor messages (GetEditorLevel, the HF_* messages) are logged when they arrive, until the server handles them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -268,7 +268,11 @@ void GameMessageHandler::HandleMessage(RakNet::BitStream& inStream, const System
|
||||
return;
|
||||
}
|
||||
|
||||
LOG_DEBUG("Received Unknown GM with ID: %4i, %s", messageID, StringifiedEnum::ToString(messageID).data());
|
||||
// The Happy Flower editor's messages, logged always until the server handles them (what a client sends while editing)
|
||||
const bool isHappyFlower = messageID == MessageType::Game::GET_EDITOR_LEVEL
|
||||
|| (messageID >= MessageType::Game::HF_ATTRIBUTES_PUSH && messageID <= MessageType::Game::HF_GETS_WANT_PATH);
|
||||
if (isHappyFlower) LOG("Received unhandled Happy Flower GM: %4i, %s", messageID, StringifiedEnum::ToString(messageID).data());
|
||||
else LOG_DEBUG("Received Unknown GM with ID: %4i, %s", messageID, StringifiedEnum::ToString(messageID).data());
|
||||
}
|
||||
|
||||
std::unique_ptr<GameMessages::NetGameMsg> GameMessageHandler::CreateReceived(MessageType::Game messageID) {
|
||||
|
||||
Reference in New Issue
Block a user