From a82646a1305291521aa76db8c0b71756c3dd0999 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Mon, 24 Apr 2017 19:46:12 +0300 Subject: [PATCH] [Client] Delineate tes3mp-only code more clearly, part 2 --- apps/openmw/mwgui/container.cpp | 8 +++++++ apps/openmw/mwgui/hud.cpp | 8 +++++++ apps/openmw/mwgui/inventorywindow.cpp | 8 +++++++ apps/openmw/mwgui/mainmenu.cpp | 12 +++++++++- apps/openmw/mwgui/spellbuyingwindow.cpp | 14 ++++++++--- apps/openmw/mwgui/spellcreationdialog.cpp | 8 +++++++ apps/openmw/mwgui/spellwindow.cpp | 14 ++++++++--- apps/openmw/mwinput/inputmanagerimp.cpp | 24 +++++++++++++++++-- apps/openmw/mwmechanics/security.cpp | 8 +++++++ apps/openmw/mwscript/animationextensions.cpp | 8 +++++++ apps/openmw/mwscript/containerextensions.cpp | 8 +++++++ apps/openmw/mwscript/dialogueextensions.cpp | 8 +++++++ apps/openmw/mwscript/interpretercontext.cpp | 8 +++++++ apps/openmw/mwscript/miscextensions.cpp | 8 +++++++ apps/openmw/mwscript/soundextensions.cpp | 8 +++++++ .../mwscript/transformationextensions.cpp | 10 +++++++- apps/openmw/mwworld/actiontake.cpp | 8 +++++++ apps/openmw/mwworld/scene.cpp | 8 +++++++ apps/openmw/mwworld/worldimp.cpp | 2 +- 19 files changed, 169 insertions(+), 11 deletions(-) diff --git a/apps/openmw/mwgui/container.cpp b/apps/openmw/mwgui/container.cpp index 984a40520..920f9561a 100644 --- a/apps/openmw/mwgui/container.cpp +++ b/apps/openmw/mwgui/container.cpp @@ -3,11 +3,19 @@ #include #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" #include "../mwmp/CellController.hpp" +/* + End of tes3mp addition +*/ #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index 9a82205d0..1b6a01098 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -1,10 +1,18 @@ #include "hud.hpp" +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" #include "../mwmp/LocalPlayer.hpp" #include "../mwworld/cellstore.hpp" +/* + End of tes3mp addition +*/ #include #include diff --git a/apps/openmw/mwgui/inventorywindow.cpp b/apps/openmw/mwgui/inventorywindow.cpp index 22e4e6899..4548ed9d5 100644 --- a/apps/openmw/mwgui/inventorywindow.cpp +++ b/apps/openmw/mwgui/inventorywindow.cpp @@ -16,11 +16,19 @@ #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" #include "../mwmp/LocalPlayer.hpp" #include "../mwworld/cellstore.hpp" +/* + End of tes3mp addition +*/ #include "../mwbase/world.hpp" #include "../mwbase/environment.hpp" diff --git a/apps/openmw/mwgui/mainmenu.cpp b/apps/openmw/mwgui/mainmenu.cpp index 9a8701c28..9165584db 100644 --- a/apps/openmw/mwgui/mainmenu.cpp +++ b/apps/openmw/mwgui/mainmenu.cpp @@ -211,8 +211,14 @@ namespace MWGui if (state==MWBase::StateManager::State_Running) buttons.push_back("return"); - /* Disabled by tes3mp + /* + Start of tes3mp change (major) + In multiplayer, the main menu should not have options for starting, loading or saving the game, + so they have been removed + */ + + /* buttons.push_back("newgame"); if (state==MWBase::StateManager::State_Running && @@ -225,6 +231,10 @@ namespace MWGui buttons.push_back("loadgame"); */ + /* + End of tes3mp change (major) + */ + buttons.push_back("options"); if (state==MWBase::StateManager::State_NoGame) diff --git a/apps/openmw/mwgui/spellbuyingwindow.cpp b/apps/openmw/mwgui/spellbuyingwindow.cpp index 2a6530cd9..4cc991475 100644 --- a/apps/openmw/mwgui/spellbuyingwindow.cpp +++ b/apps/openmw/mwgui/spellbuyingwindow.cpp @@ -4,6 +4,17 @@ #include #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ +#include "../mwmp/Main.hpp" +#include "../mwmp/LocalPlayer.hpp" +/* + End of tes3mp addition +*/ + #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" #include "../mwbase/soundmanager.hpp" @@ -17,9 +28,6 @@ #include "../mwmechanics/creaturestats.hpp" #include "../mwmechanics/actorutil.hpp" -#include "../mwmp/Main.hpp" -#include "../mwmp/LocalPlayer.hpp" - namespace MWGui { const int SpellBuyingWindow::sLineHeight = 18; diff --git a/apps/openmw/mwgui/spellcreationdialog.cpp b/apps/openmw/mwgui/spellcreationdialog.cpp index 4da04118e..470e06d74 100644 --- a/apps/openmw/mwgui/spellcreationdialog.cpp +++ b/apps/openmw/mwgui/spellcreationdialog.cpp @@ -6,8 +6,16 @@ #include #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/LocalPlayer.hpp" +/* + End of tes3mp addition +*/ #include "../mwbase/windowmanager.hpp" #include "../mwbase/soundmanager.hpp" diff --git a/apps/openmw/mwgui/spellwindow.cpp b/apps/openmw/mwgui/spellwindow.cpp index 53cb86bc5..5f1df4163 100644 --- a/apps/openmw/mwgui/spellwindow.cpp +++ b/apps/openmw/mwgui/spellwindow.cpp @@ -6,6 +6,17 @@ #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ +#include"../mwmp/Main.hpp" +#include"../mwmp/LocalPlayer.hpp" +/* + End of tes3mp addition +*/ + #include "../mwbase/windowmanager.hpp" #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" @@ -24,9 +35,6 @@ #include "confirmationdialog.hpp" #include "spellview.hpp" -#include"../mwmp/Main.hpp" -#include"../mwmp/LocalPlayer.hpp" - namespace MWGui { diff --git a/apps/openmw/mwinput/inputmanagerimp.cpp b/apps/openmw/mwinput/inputmanagerimp.cpp index e64fcdc13..26d92be72 100644 --- a/apps/openmw/mwinput/inputmanagerimp.cpp +++ b/apps/openmw/mwinput/inputmanagerimp.cpp @@ -910,17 +910,37 @@ namespace MWInput } void InputManager::quickLoad() { - /* Disabled by tes3mp + /* + Start of tes3mp change (major) + + It should not be possible to quickload the game in multiplayer, so it has been disabled + */ + + /* if (!MyGUI::InputManager::getInstance().isModalAny()) MWBase::Environment::get().getStateManager()->quickLoad(); */ + + /* + End of tes3mp change (major) + */ } void InputManager::quickSave() { - /* Disabled by tes3mp + /* + Start of tes3mp change (major) + + It should not be possible to quicksave the game in multiplayer, so it has been disabled + */ + + /* if (!MyGUI::InputManager::getInstance().isModalAny()) MWBase::Environment::get().getStateManager()->quickSave(); */ + + /* + End of tes3mp change (major) + */ } void InputManager::toggleSpell() { diff --git a/apps/openmw/mwmechanics/security.cpp b/apps/openmw/mwmechanics/security.cpp index ae5ff383a..4953b048e 100644 --- a/apps/openmw/mwmechanics/security.cpp +++ b/apps/openmw/mwmechanics/security.cpp @@ -1,8 +1,16 @@ #include "security.hpp" +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" +/* + End of tes3mp addition +*/ #include "../mwworld/cellstore.hpp" diff --git a/apps/openmw/mwscript/animationextensions.cpp b/apps/openmw/mwscript/animationextensions.cpp index b373b05a2..3e69c5078 100644 --- a/apps/openmw/mwscript/animationextensions.cpp +++ b/apps/openmw/mwscript/animationextensions.cpp @@ -3,9 +3,17 @@ #include #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" +/* + End of tes3mp addition +*/ #include "../mwworld/cellstore.hpp" #include "../mwworld/class.hpp" diff --git a/apps/openmw/mwscript/containerextensions.cpp b/apps/openmw/mwscript/containerextensions.cpp index 58cd46c40..71d22b9ac 100644 --- a/apps/openmw/mwscript/containerextensions.cpp +++ b/apps/openmw/mwscript/containerextensions.cpp @@ -6,8 +6,16 @@ #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/LocalPlayer.hpp" +/* + End of tes3mp addition +*/ #include #include diff --git a/apps/openmw/mwscript/dialogueextensions.cpp b/apps/openmw/mwscript/dialogueextensions.cpp index ff05ee9f4..0b4aa6d5c 100644 --- a/apps/openmw/mwscript/dialogueextensions.cpp +++ b/apps/openmw/mwscript/dialogueextensions.cpp @@ -1,7 +1,15 @@ #include "dialogueextensions.hpp" +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/LocalPlayer.hpp" +/* + End of tes3mp addition +*/ #include #include diff --git a/apps/openmw/mwscript/interpretercontext.cpp b/apps/openmw/mwscript/interpretercontext.cpp index 5bcb2e889..5c633daa7 100644 --- a/apps/openmw/mwscript/interpretercontext.cpp +++ b/apps/openmw/mwscript/interpretercontext.cpp @@ -10,10 +10,18 @@ #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" +/* + End of tes3mp addition +*/ #include "../mwworld/esmstore.hpp" diff --git a/apps/openmw/mwscript/miscextensions.cpp b/apps/openmw/mwscript/miscextensions.cpp index f1357794f..524ca9dbe 100644 --- a/apps/openmw/mwscript/miscextensions.cpp +++ b/apps/openmw/mwscript/miscextensions.cpp @@ -2,9 +2,17 @@ #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" +/* + End of tes3mp addition +*/ #include #include diff --git a/apps/openmw/mwscript/soundextensions.cpp b/apps/openmw/mwscript/soundextensions.cpp index f6569fd9b..0e02f27f4 100644 --- a/apps/openmw/mwscript/soundextensions.cpp +++ b/apps/openmw/mwscript/soundextensions.cpp @@ -1,8 +1,16 @@ #include "extensions.hpp" +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" +/* + End of tes3mp addition +*/ #include #include diff --git a/apps/openmw/mwscript/transformationextensions.cpp b/apps/openmw/mwscript/transformationextensions.cpp index 61df5fa5f..d916aac7e 100644 --- a/apps/openmw/mwscript/transformationextensions.cpp +++ b/apps/openmw/mwscript/transformationextensions.cpp @@ -1,8 +1,17 @@ #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ +#include #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" +/* + End of tes3mp addition +*/ #include @@ -14,7 +23,6 @@ #include #include #include -#include #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwworld/actiontake.cpp b/apps/openmw/mwworld/actiontake.cpp index ccaa14bd2..896b225a8 100644 --- a/apps/openmw/mwworld/actiontake.cpp +++ b/apps/openmw/mwworld/actiontake.cpp @@ -1,11 +1,19 @@ #include "actiontake.hpp" +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/WorldEvent.hpp" #include "../mwmp/LocalPlayer.hpp" #include "../mwworld/cellstore.hpp" +/* + End of tes3mp addition +*/ #include "../mwbase/environment.hpp" #include "../mwbase/world.hpp" diff --git a/apps/openmw/mwworld/scene.cpp b/apps/openmw/mwworld/scene.cpp index e7ea093f0..027c8800f 100644 --- a/apps/openmw/mwworld/scene.cpp +++ b/apps/openmw/mwworld/scene.cpp @@ -3,8 +3,16 @@ #include #include +/* + Start of tes3mp addition + + Include additional headers for multiplayer purposes +*/ #include "../mwmp/Main.hpp" #include "../mwmp/LocalPlayer.hpp" +/* + End of tes3mp addition +*/ #include #include diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index dffd9da09..40f1539a6 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -10,6 +10,7 @@ Include additional headers for multiplayer purposes */ +#include #include "../mwmp/Main.hpp" #include "../mwmp/Networking.hpp" #include "../mwmp/DedicatedPlayer.hpp" @@ -33,7 +34,6 @@ #include #include -#include #include "../mwbase/environment.hpp" #include "../mwbase/soundmanager.hpp"