diff --git a/AUTHORS.md b/AUTHORS.md
index bb773c4ef..d9782ccf3 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -34,6 +34,7 @@ Programmers
Ben Shealy (bentsherman)
Bret Curtis (psi29a)
Britt Mathis (galdor557)
+ Capostrophic
cc9cii
Chris Boyce (slothlife)
Chris Robinson (KittyCat)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b9f452c7a..5d34041ad 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,3 +1,43 @@
+# Apps and tools
+option(BUILD_OPENMW "build OpenMW" ON)
+option(BUILD_OPENMW_MP "build OpenMW-MP" ON)
+option(BUILD_MASTER "build tes3mp master server" OFF)
+option(BUILD_BSATOOL "build BSA extractor" ON)
+option(BUILD_ESMTOOL "build ESM inspector" ON)
+option(BUILD_LAUNCHER "build Launcher" ON)
+option(BUILD_BROWSER "build tes3mp Server Browser" ON)
+option(BUILD_MWINIIMPORTER "build MWiniImporter" ON)
+option(BUILD_ESSIMPORTER "build ESS (Morrowind save game) importer" ON)
+option(BUILD_OPENCS "build OpenMW Construction Set" ON)
+option(BUILD_WIZARD "build Installation Wizard" ON)
+option(BUILD_WITH_CODE_COVERAGE "Enable code coverage with gconv" OFF)
+option(BUILD_UNITTESTS "Enable Unittests with Google C++ Unittest" OFF)
+option(BUILD_NIFTEST "build nif file tester" OFF)
+option(BUILD_MYGUI_PLUGIN "build MyGUI plugin for OpenMW resources, to use with MyGUI tools" ON)
+option(BUILD_DOCS "build documentation." OFF )
+
+if (NOT BUILD_LAUNCHER AND NOT BUILD_BROWSER AND NOT BUILD_OPENCS AND NOT BUILD_WIZARD)
+ set(USE_QT FALSE)
+else()
+ set(USE_QT TRUE)
+endif()
+
+if (USE_QT)
+ set(DESIRED_QT_VERSION 4 CACHE STRING "The QT version OpenMW should use (4 or 5)")
+ set_property(CACHE DESIRED_QT_VERSION PROPERTY STRINGS 4 5)
+endif()
+
+if (APPLE)
+ # OS X build process relies on this fix: https://github.com/Kitware/CMake/commit/3df5147043d83aa09acd5c9ce31d5c602efb99db
+ cmake_minimum_required(VERSION 3.1.0)
+elseif (USE_QT AND DESIRED_QT_VERSION MATCHES 5)
+ # 2.8.11+ is required to make Qt5 happy and allow linking QtMain on Windows.
+ cmake_minimum_required(VERSION 2.8.11)
+else()
+ # We probably support older versions than this.
+ cmake_minimum_required(VERSION 2.6)
+endif()
+
project(OpenMW)
# If the user doesn't supply a CMAKE_BUILD_TYPE via command line, choose one for them.
@@ -59,24 +99,6 @@ option(QT_STATIC "Link static build of QT into the binaries" FALSE)
option(OPENMW_UNITY_BUILD "Use fewer compilation units to speed up compile time" FALSE)
-# Apps and tools
-option(BUILD_OPENMW "build OpenMW" ON)
-option(BUILD_OPENMW_MP "build OpenMW-MP" ON)
-option(BUILD_MASTER "build tes3mp master server" OFF)
-option(BUILD_BSATOOL "build BSA extractor" ON)
-option(BUILD_ESMTOOL "build ESM inspector" ON)
-option(BUILD_LAUNCHER "build Launcher" ON)
-option(BUILD_BROWSER "build tes3mp Server Browser" ON)
-option(BUILD_MWINIIMPORTER "build MWiniImporter" ON)
-option(BUILD_ESSIMPORTER "build ESS (Morrowind save game) importer" ON)
-option(BUILD_OPENCS "build OpenMW Construction Set" ON)
-option(BUILD_WIZARD "build Installation Wizard" ON)
-option(BUILD_WITH_CODE_COVERAGE "Enable code coverage with gconv" OFF)
-option(BUILD_UNITTESTS "Enable Unittests with Google C++ Unittest" OFF)
-option(BUILD_NIFTEST "build nif file tester" OFF)
-option(BUILD_MYGUI_PLUGIN "build MyGUI plugin for OpenMW resources, to use with MyGUI tools" ON)
-option(BUILD_DOCS "build documentation." OFF )
-
# what is necessary to build documentation
IF( BUILD_DOCS )
# Builds the documentation.
@@ -126,16 +148,8 @@ endif()
find_package(RakNet REQUIRED)
include_directories(${RakNet_INCLUDES})
-if (NOT BUILD_LAUNCHER AND NOT BUILD_BROWSER AND NOT BUILD_OPENCS AND NOT BUILD_WIZARD)
- set(USE_QT FALSE)
-else()
- set(USE_QT TRUE)
-endif()
-
# Dependencies
if (USE_QT)
- set(DESIRED_QT_VERSION 5 CACHE STRING "The QT version OpenMW should use (4 or 5)")
- set_property(CACHE DESIRED_QT_VERSION PROPERTY STRINGS 4 5)
message(STATUS "Using Qt${DESIRED_QT_VERSION}")
if (DESIRED_QT_VERSION MATCHES 4)
@@ -150,17 +164,6 @@ if (USE_QT)
endif()
endif()
-if (APPLE)
- # OS X build process relies on this fix: https://github.com/Kitware/CMake/commit/3df5147043d83aa09acd5c9ce31d5c602efb99db
- cmake_minimum_required(VERSION 3.1.0)
-elseif (USE_QT AND DESIRED_QT_VERSION MATCHES 5)
- # 2.8.11+ is required to make Qt5 happy and allow linking QtMain on Windows.
- cmake_minimum_required(VERSION 2.8.11)
-else()
- # We probably support older versions than this.
- cmake_minimum_required(VERSION 2.6)
-endif()
-
IF(BUILD_OPENMW OR BUILD_OPENCS)
# Sound setup
find_package(FFmpeg REQUIRED COMPONENTS AVCODEC AVFORMAT AVUTIL SWSCALE SWRESAMPLE)
diff --git a/apps/bsatool/CMakeLists.txt b/apps/bsatool/CMakeLists.txt
index 27baff815..ec0615ff9 100644
--- a/apps/bsatool/CMakeLists.txt
+++ b/apps/bsatool/CMakeLists.txt
@@ -4,7 +4,7 @@ set(BSATOOL
source_group(apps\\bsatool FILES ${BSATOOL})
# Main executable
-add_executable(bsatool
+openmw_add_executable(bsatool
${BSATOOL}
)
diff --git a/apps/esmtool/CMakeLists.txt b/apps/esmtool/CMakeLists.txt
index 1d5e662d8..122ca2f3a 100644
--- a/apps/esmtool/CMakeLists.txt
+++ b/apps/esmtool/CMakeLists.txt
@@ -8,7 +8,7 @@ set(ESMTOOL
source_group(apps\\esmtool FILES ${ESMTOOL})
# Main executable
-add_executable(esmtool
+openmw_add_executable(esmtool
${ESMTOOL}
)
diff --git a/apps/essimporter/CMakeLists.txt b/apps/essimporter/CMakeLists.txt
index 93f53d0e8..82182b7fa 100644
--- a/apps/essimporter/CMakeLists.txt
+++ b/apps/essimporter/CMakeLists.txt
@@ -28,7 +28,7 @@ set(ESSIMPORTER_FILES
convertplayer.cpp
)
-add_executable(openmw-essimporter
+openmw_add_executable(openmw-essimporter
${ESSIMPORTER_FILES}
)
diff --git a/apps/launcher/CMakeLists.txt b/apps/launcher/CMakeLists.txt
index 8cbe18d51..aac076404 100644
--- a/apps/launcher/CMakeLists.txt
+++ b/apps/launcher/CMakeLists.txt
@@ -78,7 +78,7 @@ if(NOT WIN32)
endif(NOT WIN32)
# Main executable
-add_executable(openmw-launcher
+openmw_add_executable(openmw-launcher
${GUI_TYPE}
${LAUNCHER}
${LAUNCHER_HEADER}
diff --git a/apps/mwiniimporter/CMakeLists.txt b/apps/mwiniimporter/CMakeLists.txt
index 4bd661685..e83656708 100644
--- a/apps/mwiniimporter/CMakeLists.txt
+++ b/apps/mwiniimporter/CMakeLists.txt
@@ -9,7 +9,7 @@ set(MWINIIMPORT_HEADER
source_group(launcher FILES ${MWINIIMPORT} ${MWINIIMPORT_HEADER})
-add_executable(openmw-iniimporter
+openmw_add_executable(openmw-iniimporter
${MWINIIMPORT}
)
diff --git a/apps/niftest/CMakeLists.txt b/apps/niftest/CMakeLists.txt
index d7f0200d2..3cbee2b7e 100644
--- a/apps/niftest/CMakeLists.txt
+++ b/apps/niftest/CMakeLists.txt
@@ -4,7 +4,7 @@ set(NIFTEST
source_group(components\\nif\\tests FILES ${NIFTEST})
# Main executable
-add_executable(niftest
+openmw_add_executable(niftest
${NIFTEST}
)
diff --git a/apps/opencs/CMakeLists.txt b/apps/opencs/CMakeLists.txt
index fc8930b71..281921c81 100644
--- a/apps/opencs/CMakeLists.txt
+++ b/apps/opencs/CMakeLists.txt
@@ -174,7 +174,7 @@ else()
set (OPENCS_OPENMW_CFG "")
endif(APPLE)
-add_executable(openmw-cs
+openmw_add_executable(openmw-cs
MACOSX_BUNDLE
${OPENCS_SRC}
${OPENCS_UI_HDR}
diff --git a/apps/opencs/model/prefs/shortcutmanager.cpp b/apps/opencs/model/prefs/shortcutmanager.cpp
index 6ae778fff..c4b46958d 100644
--- a/apps/opencs/model/prefs/shortcutmanager.cpp
+++ b/apps/opencs/model/prefs/shortcutmanager.cpp
@@ -132,7 +132,7 @@ namespace CSMPrefs
if (mods && i == 0)
{
if (mods & Qt::ControlModifier)
- result.append("Ctl+");
+ result.append("Ctrl+");
if (mods & Qt::ShiftModifier)
result.append("Shift+");
if (mods & Qt::AltModifier)
@@ -196,7 +196,7 @@ namespace CSMPrefs
std::string name = value.substr(start, end - start);
- if (name == "Ctl")
+ if (name == "Ctrl")
{
mods |= Qt::ControlModifier;
}
diff --git a/apps/openmw/CMakeLists.txt b/apps/openmw/CMakeLists.txt
index 92fa5da2d..1fb2189b9 100644
--- a/apps/openmw/CMakeLists.txt
+++ b/apps/openmw/CMakeLists.txt
@@ -131,7 +131,7 @@ add_openmw_dir (mwmp/processors/world BaseObjectProcessor ProcessorConsoleComman
# Main executable
if (NOT ANDROID)
- add_executable(tes3mp
+ openmw_add_executable(tes3mp
${OPENMW_FILES}
${GAME} ${GAME_HEADER}
${APPLE_BUNDLE_RESOURCES}
diff --git a/apps/openmw/mwbase/windowmanager.hpp b/apps/openmw/mwbase/windowmanager.hpp
index aa4cdf22c..310084c74 100644
--- a/apps/openmw/mwbase/windowmanager.hpp
+++ b/apps/openmw/mwbase/windowmanager.hpp
@@ -380,7 +380,7 @@ namespace MWBase
// In WindowManager for now since there isn't a VFS singleton
virtual std::string correctIconPath(const std::string& path) = 0;
- virtual std::string correctBookartPath(const std::string& path, int width, int height) = 0;
+ virtual std::string correctBookartPath(const std::string& path, int width, int height, bool* exists = nullptr) = 0;
virtual std::string correctTexturePath(const std::string& path) = 0;
virtual bool textureExists(const std::string& path) = 0;
diff --git a/apps/openmw/mwgui/dialogue.cpp b/apps/openmw/mwgui/dialogue.cpp
index f478dad7e..2e80301d2 100644
--- a/apps/openmw/mwgui/dialogue.cpp
+++ b/apps/openmw/mwgui/dialogue.cpp
@@ -634,7 +634,7 @@ namespace MWGui
void DialogueWindow::onFrame()
{
- if(mMainWidget->getVisible() && mEnabled && mPtr.getTypeName() == typeid(ESM::NPC).name())
+ if(mMainWidget->getVisible() && mPtr.getTypeName() == typeid(ESM::NPC).name())
{
int disp = MWBase::Environment::get().getMechanicsManager()->getDerivedDisposition(mPtr);
mDispositionBar->setProgressRange(100);
diff --git a/apps/openmw/mwgui/formatting.cpp b/apps/openmw/mwgui/formatting.cpp
index 72e1c09f3..cf4a5b589 100644
--- a/apps/openmw/mwgui/formatting.cpp
+++ b/apps/openmw/mwgui/formatting.cpp
@@ -275,8 +275,6 @@ namespace MWGui
{
case BookTextParser::Event_ImgTag:
{
- pag.setIgnoreLeadingEmptyLines(false);
-
const BookTextParser::Attributes & attr = parser.getAttributes();
if (attr.find("src") == attr.end() || attr.find("width") == attr.end() || attr.find("height") == attr.end())
@@ -286,8 +284,19 @@ namespace MWGui
int width = MyGUI::utility::parseInt(attr.at("width"));
int height = MyGUI::utility::parseInt(attr.at("height"));
+ bool exists;
+ std::string correctedSrc = MWBase::Environment::get().getWindowManager()->correctBookartPath(src, width, height, &exists);
+
+ if (!exists)
+ {
+ std::cerr << "Warning: Could not find \"" << src << "\" referenced by an tag." << std::endl;
+ break;
+ }
+
+ pag.setIgnoreLeadingEmptyLines(false);
+
ImageElement elem(paper, pag, mBlockStyle,
- src, width, height);
+ correctedSrc, width, height);
elem.paginate();
break;
}
@@ -471,8 +480,7 @@ namespace MWGui
MyGUI::IntCoord(left, pag.getCurrentTop(), width, mImageHeight), MyGUI::Align::Left | MyGUI::Align::Top,
parent->getName() + MyGUI::utility::toString(parent->getChildCount()));
- std::string image = MWBase::Environment::get().getWindowManager()->correctBookartPath(src, width, mImageHeight);
- mImageBox->setImageTexture(image);
+ mImageBox->setImageTexture(src);
mImageBox->setProperty("NeedMouse", "false");
}
diff --git a/apps/openmw/mwgui/levelupdialog.cpp b/apps/openmw/mwgui/levelupdialog.cpp
index 362ad3b1c..da8e93279 100644
--- a/apps/openmw/mwgui/levelupdialog.cpp
+++ b/apps/openmw/mwgui/levelupdialog.cpp
@@ -143,10 +143,10 @@ namespace MWGui
mLevelText->setCaptionWithReplacing("#{sLevelUpMenu1} " + MyGUI::utility::toString(level));
std::string levelupdescription;
- if(level > 20)
+ levelupdescription=world->getFallback()->getFallbackString("Level_Up_Level"+MyGUI::utility::toString(level));
+
+ if (levelupdescription == "")
levelupdescription=world->getFallback()->getFallbackString("Level_Up_Default");
- else
- levelupdescription=world->getFallback()->getFallbackString("Level_Up_Level"+MyGUI::utility::toString(level));
mLevelDescription->setCaption (levelupdescription);
diff --git a/apps/openmw/mwgui/windowmanagerimp.cpp b/apps/openmw/mwgui/windowmanagerimp.cpp
index 73acd3c2f..9f2a8e7fd 100644
--- a/apps/openmw/mwgui/windowmanagerimp.cpp
+++ b/apps/openmw/mwgui/windowmanagerimp.cpp
@@ -2128,9 +2128,12 @@ namespace MWGui
return Misc::ResourceHelpers::correctIconPath(path, mResourceSystem->getVFS());
}
- std::string WindowManager::correctBookartPath(const std::string& path, int width, int height)
+ std::string WindowManager::correctBookartPath(const std::string& path, int width, int height, bool* exists)
{
- return Misc::ResourceHelpers::correctBookartPath(path, width, height, mResourceSystem->getVFS());
+ std::string corrected = Misc::ResourceHelpers::correctBookartPath(path, width, height, mResourceSystem->getVFS());
+ if (exists)
+ *exists = mResourceSystem->getVFS()->exists(corrected);
+ return corrected;
}
std::string WindowManager::correctTexturePath(const std::string& path)
diff --git a/apps/openmw/mwgui/windowmanagerimp.hpp b/apps/openmw/mwgui/windowmanagerimp.hpp
index de9898b34..e3cbd51f6 100644
--- a/apps/openmw/mwgui/windowmanagerimp.hpp
+++ b/apps/openmw/mwgui/windowmanagerimp.hpp
@@ -408,7 +408,7 @@ namespace MWGui
// In WindowManager for now since there isn't a VFS singleton
virtual std::string correctIconPath(const std::string& path);
- virtual std::string correctBookartPath(const std::string& path, int width, int height);
+ virtual std::string correctBookartPath(const std::string& path, int width, int height, bool* exists = nullptr);
virtual std::string correctTexturePath(const std::string& path);
virtual bool textureExists(const std::string& path);
diff --git a/apps/openmw/mwmechanics/actors.cpp b/apps/openmw/mwmechanics/actors.cpp
index 0bb6d2c5d..c94acddfa 100644
--- a/apps/openmw/mwmechanics/actors.cpp
+++ b/apps/openmw/mwmechanics/actors.cpp
@@ -443,10 +443,15 @@ namespace MWMechanics
End of tes3mp addition
*/
}
-
+
// Make guards go aggressive with creatures that are in combat, unless the creature is a follower or escorter
if (actor1.getClass().isClass(actor1, "Guard") && !actor2.getClass().isNpc())
{
+ // Check if the creature is too far
+ static const float fAlarmRadius = MWBase::Environment::get().getWorld()->getStore().get().find("fAlarmRadius")->getFloat();
+ if (sqrDist > fAlarmRadius * fAlarmRadius)
+ return;
+
bool followerOrEscorter = false;
for (std::list::const_iterator it = creatureStats2.getAiSequence().begin(); it != creatureStats2.getAiSequence().end(); ++it)
{
diff --git a/apps/openmw/mwmechanics/alchemy.cpp b/apps/openmw/mwmechanics/alchemy.cpp
index 124468641..48705dc72 100644
--- a/apps/openmw/mwmechanics/alchemy.cpp
+++ b/apps/openmw/mwmechanics/alchemy.cpp
@@ -262,22 +262,16 @@ const ESM::Potion *MWMechanics::Alchemy::getRecord(const ESM::Potion& toFind) co
void MWMechanics::Alchemy::removeIngredients()
{
- bool needsUpdate = false;
-
for (TIngredientsContainer::iterator iter (mIngredients.begin()); iter!=mIngredients.end(); ++iter)
if (!iter->isEmpty())
{
iter->getContainerStore()->remove(*iter, 1, mAlchemist);
if (iter->getRefData().getCount()<1)
- {
- needsUpdate = true;
*iter = MWWorld::Ptr();
- }
}
- if (needsUpdate)
- updateEffects();
+ updateEffects();
}
void MWMechanics::Alchemy::addPotion (const std::string& name)
diff --git a/apps/openmw/mwmechanics/npcstats.cpp b/apps/openmw/mwmechanics/npcstats.cpp
index cc0fd1a7f..efe6d2491 100644
--- a/apps/openmw/mwmechanics/npcstats.cpp
+++ b/apps/openmw/mwmechanics/npcstats.cpp
@@ -422,7 +422,7 @@ bool MWMechanics::NpcStats::hasSkillsForRank (const std::string& factionId, int
for (int i=0; i<7; ++i)
{
if (faction.mData.mSkills[i] != -1)
- skills.push_back (static_cast (getSkill (faction.mData.mSkills[i]).getModified()));
+ skills.push_back (static_cast (getSkill (faction.mData.mSkills[i]).getBase()));
}
if (skills.empty())
diff --git a/apps/openmw/mwrender/creatureanimation.cpp b/apps/openmw/mwrender/creatureanimation.cpp
index 2ad362b33..735c0b66d 100644
--- a/apps/openmw/mwrender/creatureanimation.cpp
+++ b/apps/openmw/mwrender/creatureanimation.cpp
@@ -118,7 +118,7 @@ void CreatureWeaponAnimation::updatePart(PartHolderPtr& scene, int slot)
osg::ref_ptr node = mResourceSystem->getSceneManager()->getInstance(item.getClass().getModel(item));
const NodeMap& nodeMap = getNodeMap();
- NodeMap::const_iterator found = getNodeMap().find(Misc::StringUtils::lowerCase(bonename));
+ NodeMap::const_iterator found = nodeMap.find(Misc::StringUtils::lowerCase(bonename));
if (found == nodeMap.end())
throw std::runtime_error("Can't find attachment node " + bonename);
osg::ref_ptr attached = SceneUtil::attach(node, mObjectRoot, bonename, found->second.get());
diff --git a/apps/openmw/mwscript/statsextensions.cpp b/apps/openmw/mwscript/statsextensions.cpp
index 90b53170b..17ae6b304 100644
--- a/apps/openmw/mwscript/statsextensions.cpp
+++ b/apps/openmw/mwscript/statsextensions.cpp
@@ -1310,6 +1310,14 @@ namespace MWScript
if (mNegativeEffect != -1)
currentValue -= effects.get(mNegativeEffect).getMagnitude();
+ // GetResist* should take in account elemental shields
+ if (mPositiveEffect == ESM::MagicEffect::ResistFire)
+ currentValue += effects.get(ESM::MagicEffect::FireShield).getMagnitude();
+ if (mPositiveEffect == ESM::MagicEffect::ResistShock)
+ currentValue += effects.get(ESM::MagicEffect::LightningShield).getMagnitude();
+ if (mPositiveEffect == ESM::MagicEffect::ResistFrost)
+ currentValue += effects.get(ESM::MagicEffect::FrostShield).getMagnitude();
+
int ret = static_cast(currentValue);
runtime.push(ret);
}
@@ -1336,6 +1344,14 @@ namespace MWScript
if (mNegativeEffect != -1)
currentValue -= effects.get(mNegativeEffect).getMagnitude();
+ // SetResist* should take in account elemental shields
+ if (mPositiveEffect == ESM::MagicEffect::ResistFire)
+ currentValue += effects.get(ESM::MagicEffect::FireShield).getMagnitude();
+ if (mPositiveEffect == ESM::MagicEffect::ResistShock)
+ currentValue += effects.get(ESM::MagicEffect::LightningShield).getMagnitude();
+ if (mPositiveEffect == ESM::MagicEffect::ResistFrost)
+ currentValue += effects.get(ESM::MagicEffect::FrostShield).getMagnitude();
+
int arg = runtime[0].mInteger;
runtime.pop();
effects.modifyBase(mPositiveEffect, (arg - static_cast(currentValue)));
diff --git a/apps/openmw_test_suite/CMakeLists.txt b/apps/openmw_test_suite/CMakeLists.txt
index ea4b1209c..9b09bc41f 100644
--- a/apps/openmw_test_suite/CMakeLists.txt
+++ b/apps/openmw_test_suite/CMakeLists.txt
@@ -17,7 +17,7 @@ if (GTEST_FOUND)
source_group(apps\\openmw_test_suite FILES openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
- add_executable(openmw_test_suite openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
+ openmw_add_executable(openmw_test_suite openmw_test_suite.cpp ${UNITTEST_SRC_FILES})
target_link_libraries(openmw_test_suite ${GTEST_BOTH_LIBRARIES} components)
# Fix for not visible pthreads functions for linker with glibc 2.15
diff --git a/apps/wizard/CMakeLists.txt b/apps/wizard/CMakeLists.txt
index d2b9ab0f6..5f7338e52 100644
--- a/apps/wizard/CMakeLists.txt
+++ b/apps/wizard/CMakeLists.txt
@@ -96,7 +96,7 @@ if (OPENMW_USE_UNSHIELD)
include_directories(${LIBUNSHIELD_INCLUDE_DIRS})
endif()
-add_executable(openmw-wizard
+openmw_add_executable(openmw-wizard
${GUI_TYPE}
${WIZARD}
${WIZARD_HEADER}
diff --git a/cmake/OpenMWMacros.cmake b/cmake/OpenMWMacros.cmake
index 04530f313..12420d103 100644
--- a/cmake/OpenMWMacros.cmake
+++ b/cmake/OpenMWMacros.cmake
@@ -145,3 +145,32 @@ foreach (u ${ARGN})
add_hdr (OPENCS ${dir} ${u})
endforeach (u)
endmacro (opencs_hdrs_noqt)
+
+include(CMakeParseArguments)
+
+macro (openmw_add_executable target)
+ set(OMW_ADD_EXE_OPTIONS WIN32 MACOSX_BUNDLE EXCLUDE_FROM_ALL)
+ set(OMW_ADD_EXE_VALUES)
+ set(OMW_ADD_EXE_MULTI_VALUES)
+ cmake_parse_arguments(OMW_ADD_EXE "${OMW_ADD_EXE_OPTIONS}" "${OMW_ADD_EXE_VALUES}" "${OMW_ADD_EXE_MULTI_VALUES}" ${ARGN})
+
+ if (OMW_ADD_EXE_WIN32)
+ set(OMW_ADD_EXE_WIN32_VALUE WIN32)
+ endif (OMW_ADD_EXE_WIN32)
+
+ if (OMW_ADD_EXE_MACOSX_BUNDLE)
+ set(OMW_ADD_EXE_MACOSX_BUNDLE_VALUE MACOSX_BUNDLE)
+ endif (OMW_ADD_EXE_MACOSX_BUNDLE)
+
+ if (OMW_ADD_EXE_EXCLUDE_FROM_ALL)
+ set(OMW_ADD_EXE_EXCLUDE_FROM_ALL_VALUE EXCLUDE_FROM_ALL)
+ endif (OMW_ADD_EXE_EXCLUDE_FROM_ALL)
+
+ add_executable(${target} ${OMW_ADD_EXE_WIN32_VALUE} ${OMW_ADD_EXE_MACOSX_BUNDLE_VALUE} ${OMW_ADD_EXE_EXCLUDE_FROM_ALL_VALUE} ${OMW_ADD_EXE_UNPARSED_ARGUMENTS})
+
+ if (MSVC)
+ if (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)
+ set_target_properties(${target} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "$(TargetDir)")
+ endif (CMAKE_VERSION VERSION_GREATER 3.8 OR CMAKE_VERSION VERSION_EQUAL 3.8)
+ endif (MSVC)
+endmacro (openmw_add_executable)
diff --git a/components/sceneutil/morphgeometry.cpp b/components/sceneutil/morphgeometry.cpp
index 2ffbace3b..1b7e4ca93 100644
--- a/components/sceneutil/morphgeometry.cpp
+++ b/components/sceneutil/morphgeometry.cpp
@@ -62,10 +62,7 @@ void MorphGeometry::dirty()
{
mDirty = true;
if (!mMorphedBoundingBox)
- {
- _boundingBoxComputed = false;
dirtyBound();
- }
}
osg::ref_ptr MorphGeometry::getSourceGeometry() const
diff --git a/components/widgets/windowcaption.hpp b/components/widgets/windowcaption.hpp
index bdd4c0a2e..b45da2d1c 100644
--- a/components/widgets/windowcaption.hpp
+++ b/components/widgets/windowcaption.hpp
@@ -23,6 +23,7 @@ namespace Gui
private:
MyGUI::Widget* mLeft;
MyGUI::Widget* mRight;
+ MyGUI::Widget* mClient;
void align();
};