FIXED: chat history clears on disconnect

This commit is contained in:
mschiller890
2026-03-16 19:05:55 +01:00
parent 997c3f2ebe
commit 2bc3be3153
3 changed files with 7 additions and 0 deletions

View File

@@ -335,6 +335,7 @@ void Minecraft::leaveGame(bool renameLevel /*=false*/)
_running = false;
#ifndef STANDALONE_SERVER
gui.clearMessages();
if (renameLevel) {
setScreen(new RenameMPLevelScreen(LevelStorageSource::TempLevelId));
}

View File

@@ -334,6 +334,11 @@ void Gui::addMessage(const std::string& _string) {
}
}
void Gui::clearMessages() {
guiMessages.clear();
chatScrollOffset = 0;
}
void Gui::setNowPlaying(const std::string& string) {
overlayMessageString = "Now playing: " + string;
overlayMessageTime = 20 * 3;

View File

@@ -66,6 +66,7 @@ public:
void renderProgressIndicator( const bool isTouchInterface, const int screenWidth, const int screenHeight, float a );
void addMessage(const std::string& string);
void clearMessages();
void postError(int errCode);
void onGraphicsReset();