mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-03-23 15:50:20 +00:00
Remove single-player mode to focus on multiplayer
Removed all single-player/offline mode functionality: - Removed ~2,200 lines of SQLite database code - Removed 11 public SP methods from GameHandler - Removed SP member variables and state flags - Removed SP UI elements (auth screen button, game settings) - Removed SQLite3 build dependency - Deleted docs/single-player.md - Updated documentation (README, FEATURES, CHANGELOG) Files modified: - src/game/game_handler.cpp: 2,852 lines (down from 4,921) - include/game/game_handler.hpp: Removed SP API - src/core/application.cpp/hpp: Removed startSinglePlayer() - src/ui/*: Removed SP UI logic - CMakeLists.txt: Removed SQLite3 All online multiplayer features preserved and tested.
This commit is contained in:
parent
82afb83591
commit
fb2e9bfb3d
15 changed files with 4959 additions and 3536 deletions
|
|
@ -673,15 +673,8 @@ void GameScreen::processTargetInput(game::GameHandler& gameHandler) {
|
|||
auto unit = std::static_pointer_cast<game::Unit>(target);
|
||||
if (unit->getHealth() == 0 && unit->getMaxHealth() > 0) {
|
||||
gameHandler.lootTarget(target->getGuid());
|
||||
} else if (gameHandler.isSinglePlayerMode()) {
|
||||
// Single-player: interact with friendly NPCs, otherwise attack
|
||||
if (!unit->isHostile() && unit->isInteractable()) {
|
||||
gameHandler.interactWithNpc(target->getGuid());
|
||||
} else {
|
||||
gameHandler.startAutoAttack(target->getGuid());
|
||||
}
|
||||
} else {
|
||||
// Online mode: interact with friendly NPCs, otherwise attack
|
||||
// Interact with friendly NPCs, otherwise attack
|
||||
if (!unit->isHostile() && unit->isInteractable()) {
|
||||
gameHandler.interactWithNpc(target->getGuid());
|
||||
} else {
|
||||
|
|
@ -761,12 +754,6 @@ void GameScreen::renderPlayerFrame(game::GameHandler& gameHandler) {
|
|||
}
|
||||
}
|
||||
|
||||
// Override with local player stats in single-player mode
|
||||
if (gameHandler.isSinglePlayerMode() && gameHandler.getLocalPlayerMaxHealth() > 0) {
|
||||
playerHp = gameHandler.getLocalPlayerHealth();
|
||||
playerMaxHp = gameHandler.getLocalPlayerMaxHealth();
|
||||
}
|
||||
|
||||
// Health bar
|
||||
float pct = static_cast<float>(playerHp) / static_cast<float>(playerMaxHp);
|
||||
ImVec4 hpColor = isDead ? ImVec4(0.5f, 0.5f, 0.5f, 1.0f) : ImVec4(0.2f, 0.8f, 0.2f, 1.0f);
|
||||
|
|
@ -2789,27 +2776,6 @@ void GameScreen::renderSettingsWindow() {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (auto* gameHandler = core::Application::getInstance().getGameHandler()) {
|
||||
if (gameHandler->isSinglePlayerMode()) {
|
||||
game::GameHandler::SinglePlayerSettings spSettings;
|
||||
if (gameHandler->getSinglePlayerSettings(spSettings)) {
|
||||
pendingFullscreen = spSettings.fullscreen;
|
||||
pendingVsync = spSettings.vsync;
|
||||
pendingShadows = spSettings.shadows;
|
||||
pendingMusicVolume = spSettings.musicVolume;
|
||||
pendingSfxVolume = spSettings.sfxVolume;
|
||||
pendingMouseSensitivity = spSettings.mouseSensitivity;
|
||||
pendingInvertMouse = spSettings.invertMouse;
|
||||
for (int i = 0; i < kResCount; i++) {
|
||||
if (kResolutions[i][0] == spSettings.resWidth &&
|
||||
kResolutions[i][1] == spSettings.resHeight) {
|
||||
pendingResIndex = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
pendingUiOpacity = static_cast<int>(uiOpacity_ * 100.0f + 0.5f);
|
||||
settingsInit = true;
|
||||
}
|
||||
|
|
@ -2909,21 +2875,6 @@ void GameScreen::renderSettingsWindow() {
|
|||
cameraController->setInvertMouse(pendingInvertMouse);
|
||||
}
|
||||
}
|
||||
if (auto* gameHandler = core::Application::getInstance().getGameHandler()) {
|
||||
if (gameHandler->isSinglePlayerMode()) {
|
||||
game::GameHandler::SinglePlayerSettings spSettings;
|
||||
spSettings.fullscreen = pendingFullscreen;
|
||||
spSettings.vsync = pendingVsync;
|
||||
spSettings.shadows = pendingShadows;
|
||||
spSettings.resWidth = kResolutions[pendingResIndex][0];
|
||||
spSettings.resHeight = kResolutions[pendingResIndex][1];
|
||||
spSettings.musicVolume = pendingMusicVolume;
|
||||
spSettings.sfxVolume = pendingSfxVolume;
|
||||
spSettings.mouseSensitivity = pendingMouseSensitivity;
|
||||
spSettings.invertMouse = pendingInvertMouse;
|
||||
gameHandler->setSinglePlayerSettings(spSettings);
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::Spacing();
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(10.0f, 10.0f));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue