diff --git a/CMakeLists.txt b/CMakeLists.txt index e8f7f8647..1dff0f58f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -538,6 +538,7 @@ if(WIN32) SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.openmw.org") SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.openmw.org") SET(CPACK_NSIS_INSTALLED_ICON_NAME "openmw-launcher.exe") + SET(CPACK_NSIS_MUI_FINISHPAGE_RUN "openmw-launcher.exe") SET(CPACK_NSIS_MUI_ICON "${OpenMW_SOURCE_DIR}/files/tes3mp/tes3mp.ico") SET(CPACK_NSIS_MUI_UNIICON "${OpenMW_SOURCE_DIR}/files/tes3mp/tes3mp.ico") SET(CPACK_PACKAGE_ICON "${OpenMW_SOURCE_DIR}\\\\files\\\\openmw.bmp") diff --git a/apps/openmw-mp/Cell.cpp b/apps/openmw-mp/Cell.cpp index 4bd24d4a4..a804fd8a4 100644 --- a/apps/openmw-mp/Cell.cpp +++ b/apps/openmw-mp/Cell.cpp @@ -30,8 +30,17 @@ Cell::Iterator Cell::end() const void Cell::addPlayer(Player *player) { - auto it = find(player->cells.begin(), player->cells.end(), this); - if (it == player->cells.end()) + // Ensure the player hasn't already been added + auto it = find(begin(), end(), player); + + if (it != end()) + { + LOG_APPEND(Log::LOG_INFO, "- Attempt to add %s to Cell %s again was ignored", player->npc.mName.c_str(), getDescription().c_str()); + return; + } + + auto it2 = find(player->cells.begin(), player->cells.end(), this); + if (it2 == player->cells.end()) { LOG_APPEND(Log::LOG_INFO, "- Adding %s to Player %s", getDescription().c_str(), player->npc.mName.c_str()); diff --git a/apps/openmw/mwgui/containeritemmodel.cpp b/apps/openmw/mwgui/containeritemmodel.cpp index 479638672..9f7a9965c 100644 --- a/apps/openmw/mwgui/containeritemmodel.cpp +++ b/apps/openmw/mwgui/containeritemmodel.cpp @@ -142,6 +142,9 @@ void ContainerItemModel::update() for (MWWorld::ContainerStoreIterator it = store.begin(); it != store.end(); ++it) { + if (!(*it).getClass().showsInInventory(*it)) + continue; + std::vector::iterator itemStack = mItems.begin(); for (; itemStack != mItems.end(); ++itemStack) { diff --git a/apps/openmw/mwgui/trainingwindow.cpp b/apps/openmw/mwgui/trainingwindow.cpp index b6504d223..04b051e16 100644 --- a/apps/openmw/mwgui/trainingwindow.cpp +++ b/apps/openmw/mwgui/trainingwindow.cpp @@ -203,4 +203,10 @@ namespace MWGui checkReferenceAvailable(); mTimeAdvancer.onFrame(dt); } + + bool TrainingWindow::exit() + { + return !mTimeAdvancer.isRunning(); + } + } diff --git a/apps/openmw/mwgui/trainingwindow.hpp b/apps/openmw/mwgui/trainingwindow.hpp index 69a013059..2edad1f27 100644 --- a/apps/openmw/mwgui/trainingwindow.hpp +++ b/apps/openmw/mwgui/trainingwindow.hpp @@ -16,7 +16,7 @@ namespace MWGui virtual void onOpen(); - bool exit() { return false; } + bool exit(); void setPtr(const MWWorld::Ptr& actor); diff --git a/apps/openmw/mwmp/GUIController.cpp b/apps/openmw/mwmp/GUIController.cpp index 9cd496887..cff86664a 100644 --- a/apps/openmw/mwmp/GUIController.cpp +++ b/apps/openmw/mwmp/GUIController.cpp @@ -43,7 +43,7 @@ mwmp::GUIController::GUIController(): mInputBox(0), mListBox(0) mChat = nullptr; keySay = SDL_SCANCODE_Y; keyChatMode = SDL_SCANCODE_F2; - calledMessageBox = false; + calledInteractiveMessage = false; } mwmp::GUIController::~GUIController() @@ -118,10 +118,7 @@ void mwmp::GUIController::showDialogList(const mwmp::BasePlayer::GUIMessageBox & void mwmp::GUIController::showMessageBox(const BasePlayer::GUIMessageBox &guiMessageBox) { MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager(); - std::vector buttons; - buttons.push_back("Ok"); - windowManager->interactiveMessageBox(guiMessageBox.label, buttons); - calledMessageBox = true; + windowManager->messageBox(guiMessageBox.label); } std::vector splitString(const std::string &str, char delim = ';') @@ -139,7 +136,7 @@ void mwmp::GUIController::showCustomMessageBox(const BasePlayer::GUIMessageBox & MWBase::WindowManager *windowManager = MWBase::Environment::get().getWindowManager(); std::vector buttons = splitString(guiMessageBox.buttons); windowManager->interactiveMessageBox(guiMessageBox.label, buttons); - calledMessageBox = true; + calledInteractiveMessage = true; } void mwmp::GUIController::showInputBox(const BasePlayer::GUIMessageBox &guiMessageBox) @@ -207,10 +204,10 @@ void mwmp::GUIController::update(float dt) // checked somewhere else int pressedButton = MWBase::Environment::get().getWindowManager()->readPressedButton(false); - if (pressedButton != -1 && calledMessageBox) + if (pressedButton != -1 && calledInteractiveMessage) { LOG_MESSAGE_SIMPLE(Log::LOG_VERBOSE, "Pressed: %d", pressedButton); - calledMessageBox = false; + calledInteractiveMessage = false; Main::get().getLocalPlayer()->guiMessageBox.data = MyGUI::utility::toString(pressedButton); Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->setPlayer(Main::get().getLocalPlayer()); Main::get().getNetworking()->getPlayerPacket(ID_GUI_MESSAGEBOX)->Send(); diff --git a/apps/openmw/mwmp/GUIController.hpp b/apps/openmw/mwmp/GUIController.hpp index 8e6efba15..db42d692f 100644 --- a/apps/openmw/mwmp/GUIController.hpp +++ b/apps/openmw/mwmp/GUIController.hpp @@ -69,7 +69,7 @@ namespace mwmp int keyChatMode; long id; - bool calledMessageBox; + bool calledInteractiveMessage; TextInputDialog *mInputBox; GUIDialogList *mListBox; void onInputBoxDone(MWGui::WindowBase* parWindow);