Fixing bugs

This commit is contained in:
Vladislav Khorev committed 2026-03-06 23:15:56 +03:00
1 parent 41f370f2ee
commit 7ccda081b0
10 files changed
+50 -11

No files matched your search

+9
View File
@@ -146,6 +146,13 @@ namespace ZL
menuManager.setupMenu();
menuManager.onMainMenuEntered = [this]() {
if (networkClient) {
networkClient->Disconnect();
networkClient.reset();
}
};
menuManager.onSingleplayerPressed = [this](const std::string& nickname, int shipType) {
Environment::shipState.nickname = nickname;
Environment::shipState.shipType = shipType;
@@ -169,6 +176,7 @@ namespace ZL
networkClient = std::unique_ptr<INetworkClient>(localClient);
networkClient->Connect("", 0);
space.resetPlayerState();
lastTickCount = 0;
};
@@ -195,6 +203,7 @@ namespace ZL
space.boxAlive.clear();
space.serverBoxesApplied = false;
space.resetPlayerState();
connectingStartTicks = SDL_GetTicks();
lastTickCount = 0;
};