From 516fc0283b11c4ae51907cf2348767e8ee10d8ae Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Fri, 22 Jun 2018 15:07:39 +0000 Subject: [PATCH 01/29] Update .gitlab-ci.yml From dcba3a105860bff0f6ab484502c7cb351327d51b Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Fri, 22 Jun 2018 15:13:09 +0000 Subject: [PATCH 02/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 78 +++++++++++++++++++++++++------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9f5442ae42..3cfb429c12 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,42 +1,42 @@ -# use the official gcc image, based on debian -# can use verions as well, like gcc:5.2 -# see https://hub.docker.com/_/gcc/ -image: gcc - -cache: - key: apt-cache - paths: - - apt-cache/ - -before_script: - - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR - - apt-get update -yq - - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt4-dev libopenal-dev libopenscenegraph-3.4-dev libunshield-dev libtinyxml-dev -# - apt-get install -y libmygui-dev libbullet-dev # to be updated to latest below because stretch is too old - - curl http://ftp.us.debian.org/debian/pool/main/b/bullet/libbullet-dev_2.87+dfsg-2_amd64.deb -o libbullet-dev_2.87+dfsg-2_amd64.deb - - curl http://ftp.us.debian.org/debian/pool/main/b/bullet/libbullet2.87_2.87+dfsg-2_amd64.deb -o libbullet2.87_2.87+dfsg-2_amd64.deb - - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmygui.openglplatform0debian1v5_3.2.2+dfsg-1_amd64.deb -o libmygui.openglplatform0debian1v5_3.2.2+dfsg-1_amd64.deb - - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmyguiengine3debian1v5_3.2.2+dfsg-1_amd64.deb -o libmyguiengine3debian1v5_3.2.2+dfsg-1_amd64.deb - - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmygui-dev_3.2.2+dfsg-1_amd64.deb -o libmygui-dev_3.2.2+dfsg-1_amd64.deb - - dpkg --ignore-depends=libmygui.ogreplatform0debian1v5 -i *.deb - -build: - stage: build - script: - - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi - - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ - - make -j$cores_to_use - - DESTDIR=artifacts make install - artifacts: - paths: - - build/artifacts/ - # depending on your build setup it's most likely a good idea to cache outputs to reduce the build time +linux-stable: + image: gcc + cache: + key: apt-cache paths: - - "*.o" + - apt-cache/ + + before_script: + - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR + - apt-get update -yq + - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y cmake libboost-filesystem-dev libboost-program-options-dev libboost-system-dev libavcodec-dev libavformat-dev libavutil-dev libswscale-dev libswresample-dev libsdl2-dev libqt4-dev libopenal-dev libopenscenegraph-3.4-dev libunshield-dev libtinyxml-dev + # - apt-get install -y libmygui-dev libbullet-dev # to be updated to latest below because stretch is too old + - curl http://ftp.us.debian.org/debian/pool/main/b/bullet/libbullet-dev_2.87+dfsg-2_amd64.deb -o libbullet-dev_2.87+dfsg-2_amd64.deb + - curl http://ftp.us.debian.org/debian/pool/main/b/bullet/libbullet2.87_2.87+dfsg-2_amd64.deb -o libbullet2.87_2.87+dfsg-2_amd64.deb + - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmygui.openglplatform0debian1v5_3.2.2+dfsg-1_amd64.deb -o libmygui.openglplatform0debian1v5_3.2.2+dfsg-1_amd64.deb + - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmyguiengine3debian1v5_3.2.2+dfsg-1_amd64.deb -o libmyguiengine3debian1v5_3.2.2+dfsg-1_amd64.deb + - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmygui-dev_3.2.2+dfsg-1_amd64.deb -o libmygui-dev_3.2.2+dfsg-1_amd64.deb + - dpkg --ignore-depends=libmygui.ogreplatform0debian1v5 -i *.deb + + build: + stage: build + script: + - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi + - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ + - make -j$cores_to_use + - DESTDIR=artifacts make install + artifacts: + paths: + - build/artifacts/ +darwin: + build: + stage: build + script: + - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi + - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ + - make -j$cores_to_use + - DESTDIR=artifacts make install + artifacts: + paths: + - build/artifacts/ -# TODO: run tests using the binary built before -#test: -# stage: test -# script: -# - ls From 601b69b36c293a65eb4ca50494d5579656097a3b Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Fri, 22 Jun 2018 15:14:09 +0000 Subject: [PATCH 03/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3cfb429c12..7e156275f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,6 @@ +stages: + - build + linux-stable: image: gcc From 88555c04635165114e3f6f251663eeb4f0d29b45 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Fri, 22 Jun 2018 15:20:38 +0000 Subject: [PATCH 04/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e156275f9..80a6c4cdbf 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,25 +21,23 @@ linux-stable: - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmygui-dev_3.2.2+dfsg-1_amd64.deb -o libmygui-dev_3.2.2+dfsg-1_amd64.deb - dpkg --ignore-depends=libmygui.ogreplatform0debian1v5 -i *.deb - build: - stage: build - script: - - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi - - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ - - make -j$cores_to_use - - DESTDIR=artifacts make install - artifacts: - paths: - - build/artifacts/ -darwin: - build: - stage: build - script: - - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi - - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ - - make -j$cores_to_use - - DESTDIR=artifacts make install - artifacts: - paths: - - build/artifacts/ + stage: build + script: + - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi + - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ + - make -j$cores_to_use + - DESTDIR=artifacts make install + artifacts: + paths: + - build/artifacts/ +darwin: + stage: build + script: + - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi + - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ + - make -j$cores_to_use + - DESTDIR=artifacts make install + artifacts: + paths: + - build/artifacts/ \ No newline at end of file From 393ec9994475ed75178d1bc6ddd3e9a90dfb0f2d Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Fri, 22 Jun 2018 15:29:27 +0000 Subject: [PATCH 05/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 80a6c4cdbf..a87fcae0a9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,10 @@ stages: - build linux-stable: + tags: + - debian + - linux + image: gcc cache: @@ -32,6 +36,9 @@ linux-stable: paths: - build/artifacts/ darwin: + tags: + - xcode_7-2 + - osx_10-11 stage: build script: - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi From c2826ca8786af19eedb0e521d1bc18f19816ad73 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Fri, 22 Jun 2018 16:41:20 +0000 Subject: [PATCH 06/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a87fcae0a9..bf206df219 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,7 +3,7 @@ stages: linux-stable: tags: - - debian + - docker - linux image: gcc @@ -37,8 +37,8 @@ linux-stable: - build/artifacts/ darwin: tags: - - xcode_7-2 - - osx_10-11 + - macos + - macos_10_12 stage: build script: - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi From 40a9d8ac06ff51a7e0900f121df29d5d8af9c59c Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sat, 23 Jun 2018 07:19:05 +0000 Subject: [PATCH 07/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index bf206df219..807738c318 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ linux-stable: darwin: tags: - macos - - macos_10_12 + - xcode stage: build script: - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi From 35b0546737f3dfa7f08bd3202a054648da0f35ae Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Sat, 23 Jun 2018 14:21:21 +0300 Subject: [PATCH 08/29] Consider

tag when discarding post-EOL tag text (regression #4473) --- apps/openmw/mwgui/formatting.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwgui/formatting.cpp b/apps/openmw/mwgui/formatting.cpp index 16568e2f34..edcb94eed9 100644 --- a/apps/openmw/mwgui/formatting.cpp +++ b/apps/openmw/mwgui/formatting.cpp @@ -31,13 +31,16 @@ namespace MWGui boost::algorithm::replace_all(mText, "\r", ""); - // vanilla game does not show any text after last
tag. + // vanilla game does not show any text after the last EOL tag. const std::string lowerText = Misc::StringUtils::lowerCase(mText); - int index = lowerText.rfind("
"); - if (index == -1) + int brIndex = lowerText.rfind("
"); + int pIndex = lowerText.rfind("

"); + if (brIndex == pIndex) mText = ""; + else if (brIndex > pIndex) + mText = mText.substr(0, brIndex+4); else - mText = mText.substr(0, index+4); + mText = mText.substr(0, pIndex+3); registerTag("br", Event_BrTag); registerTag("p", Event_PTag); From afbe8f21616531f9664b9963f18f2c2735bde919 Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Sat, 23 Jun 2018 14:29:15 +0300 Subject: [PATCH 09/29] Update changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 782a817e82..aef35f5a29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,7 +22,7 @@ Bug #4036: Weird behaviour of AI packages if package target has non-unique ID Bug #4047: OpenMW not reporting its version number in MacOS; OpenMW-CS not doing it fully Bug #4125: OpenMW logo cropped on bugtracker - Bug #4215: OpenMW shows book text after last
tag + Bug #4215: OpenMW shows book text after last EOL tag Bug #4221: Characters get stuck in V-shaped terrain Bug #4251: Stationary NPCs do not return to their position after combat Bug #4286: Scripted animations can be interrupted From 55de1c1a721edf3c14dd8ff836c336292585ec45 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sat, 23 Jun 2018 13:22:20 +0000 Subject: [PATCH 10/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 807738c318..3ae419c1df 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,7 @@ stages: - build -linux-stable: +Debian: tags: - docker - linux @@ -35,11 +35,12 @@ linux-stable: artifacts: paths: - build/artifacts/ -darwin: +MacOS: tags: - macos - xcode stage: build + allow_failure: true script: - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ From f1158e8129d947117acee2fac4f906c0faf37eda Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sat, 23 Jun 2018 13:50:58 +0000 Subject: [PATCH 11/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3ae419c1df..690ef8ef34 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,10 +41,10 @@ MacOS: - xcode stage: build allow_failure: true - script: - - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi - - mkdir build; cd build; cmake -DCMAKE_BUILD_TYPE=MinSizeRel ../ - - make -j$cores_to_use + script: + - CI/before_install.osx.sh + - CI/before_script.osx.sh + - make -j2 - DESTDIR=artifacts make install artifacts: paths: From ecafcefae9efaab61d21f429f10be598ec178e21 Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Sun, 24 Jun 2018 14:39:48 +0300 Subject: [PATCH 12/29] Fall back to regular head when getVampireHead fails --- apps/openmw/mwrender/npcanimation.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/openmw/mwrender/npcanimation.cpp b/apps/openmw/mwrender/npcanimation.cpp index 08e376f083..baf6cb8229 100644 --- a/apps/openmw/mwrender/npcanimation.cpp +++ b/apps/openmw/mwrender/npcanimation.cpp @@ -416,6 +416,7 @@ void NpcAnimation::updateNpcBase() const ESM::Race *race = store.get().find(mNpc->mRace); bool isWerewolf = (mNpcType == Type_Werewolf); bool isVampire = (mNpcType == Type_Vampire); + bool isFemale = !mNpc->isMale(); if (isWerewolf) { @@ -425,8 +426,9 @@ void NpcAnimation::updateNpcBase() else { mHeadModel = ""; - if (isVampire) // FIXME: fall back to regular head when getVampireHead fails? - mHeadModel = getVampireHead(mNpc->mRace, mNpc->mFlags & ESM::NPC::Female); + const std::string& vampireHead = getVampireHead(mNpc->mRace, isFemale); + if (isVampire && !vampireHead.empty()) + mHeadModel = vampireHead; else if (!mNpc->mHead.empty()) { const ESM::BodyPart* bp = store.get().search(mNpc->mHead); @@ -448,7 +450,6 @@ void NpcAnimation::updateNpcBase() } bool isBeast = (race->mData.mFlags & ESM::Race::Beast) != 0; - bool isFemale = !mNpc->isMale(); std::string smodel; if (mViewMode != VM_FirstPerson) From d6a170f8483fd7cecc71b8cf12fb69207d1e457a Mon Sep 17 00:00:00 2001 From: Capostrophic <21265616+Capostrophic@users.noreply.github.com> Date: Sun, 24 Jun 2018 14:58:54 +0300 Subject: [PATCH 13/29] Update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 782a817e82..7276593a4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -49,6 +49,7 @@ Bug #4461: "Open" spell from non-player caster isn't a crime Bug #4469: Abot Silt Striders – Model turn 90 degrees on horizontal Bug #4471: Retrieve SDL window settings instead of using magic numbers + Bug #4474: No fallback when getVampireHead fails Feature #3276: Editor: Search- Show number of (remaining) search results and indicate a search without any results Feature #4222: 360° screenshots Feature #4256: Implement ToggleBorders (TB) console command From 87f367ec117db627c8fc6d2f72861151a356ff96 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sun, 24 Jun 2018 17:52:57 +0000 Subject: [PATCH 14/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 690ef8ef34..fc00ba728a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,14 +5,11 @@ Debian: tags: - docker - linux - image: gcc - cache: key: apt-cache paths: - apt-cache/ - before_script: - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR - apt-get update -yq @@ -24,8 +21,6 @@ Debian: - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmyguiengine3debian1v5_3.2.2+dfsg-1_amd64.deb -o libmyguiengine3debian1v5_3.2.2+dfsg-1_amd64.deb - curl http://ftp.us.debian.org/debian/pool/main/m/mygui/libmygui-dev_3.2.2+dfsg-1_amd64.deb -o libmygui-dev_3.2.2+dfsg-1_amd64.deb - dpkg --ignore-depends=libmygui.ogreplatform0debian1v5 -i *.deb - - stage: build script: - cores_to_use=$((`nproc`-2)); if (( $cores_to_use < 1 )); then cores_to_use=1; fi @@ -42,6 +37,7 @@ MacOS: stage: build allow_failure: true script: + - macos_qt_formula=qt - CI/before_install.osx.sh - CI/before_script.osx.sh - make -j2 From d008cd0c46c1ff8e78164aafa0ae883862897b17 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Sun, 24 Jun 2018 21:26:53 +0000 Subject: [PATCH 15/29] Update .gitlab-ci.yml --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fc00ba728a..83a6ab63f7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,8 +37,8 @@ MacOS: stage: build allow_failure: true script: - - macos_qt_formula=qt - - CI/before_install.osx.sh + #- macos_qt_formula=qt + #- CI/before_install.osx.sh - CI/before_script.osx.sh - make -j2 - DESTDIR=artifacts make install From 359e748c28671700cd6ed98eef096928f54f9491 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Mon, 25 Jun 2018 09:35:42 +0400 Subject: [PATCH 16/29] Initialize some missing fields in constructors --- apps/openmw/mwsound/openal_output.cpp | 2 +- components/esm/loadland.hpp | 7 ++++++- components/esm/loadpgrd.hpp | 5 ++++- components/esm/objectstate.hpp | 4 +++- components/esmterrain/storage.cpp | 2 ++ components/terrain/quadtreenode.cpp | 1 + components/widgets/windowcaption.cpp | 1 + 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index 31d46ce311..f4587130e0 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -387,7 +387,7 @@ private: OpenAL_SoundStream::OpenAL_SoundStream(ALuint src, DecoderPtr decoder) : mSource(src), mCurrentBufIdx(0), mFormat(AL_NONE), mSampleRate(0) , mBufferSize(0), mFrameSize(0), mSilence(0), mDecoder(std::move(decoder)) - , mLoudnessAnalyzer(nullptr) + , mLoudnessAnalyzer(nullptr), mIsFinished(true) { mBuffers.fill(0); } diff --git a/components/esm/loadland.hpp b/components/esm/loadland.hpp index 2163c30fc7..cccb472de9 100644 --- a/components/esm/loadland.hpp +++ b/components/esm/loadland.hpp @@ -83,7 +83,12 @@ struct Land struct LandData { LandData() - : mDataLoaded(0) + : mHeightOffset(0) + , mMinHeight(0) + , mMaxHeight(0) + , mUnk1(0) + , mUnk2(0) + , mDataLoaded(0) { } diff --git a/components/esm/loadpgrd.hpp b/components/esm/loadpgrd.hpp index d1003eb865..4e74c9a24d 100644 --- a/components/esm/loadpgrd.hpp +++ b/components/esm/loadpgrd.hpp @@ -36,7 +36,10 @@ struct Pathgrid Point& operator=(const float[3]); Point(const float[3]); Point(); - Point(int x, int y, int z) : mX(x), mY(y), mZ(z) {} + Point(int x, int y, int z) + : mX(x), mY(y), mZ(z) + , mAutogenerated(0), mConnectionNum(0), mUnknown(0) + {} }; // 16 bytes struct Edge // path grid edge diff --git a/components/esm/objectstate.hpp b/components/esm/objectstate.hpp index b8eb138ebe..d14c04b648 100644 --- a/components/esm/objectstate.hpp +++ b/components/esm/objectstate.hpp @@ -34,7 +34,9 @@ namespace ESM ESM::AnimationState mAnimationState; - ObjectState() : mHasCustomState(true), mVersion(0) + ObjectState() + : mHasLocals(0), mEnabled(0), mCount(0) + , mFlags(0), mHasCustomState(true), mVersion(0) {} /// @note Does not load the CellRef ID, it should already be loaded before calling this method diff --git a/components/esmterrain/storage.cpp b/components/esmterrain/storage.cpp index 52850fd746..ff3123c5b8 100644 --- a/components/esmterrain/storage.cpp +++ b/components/esmterrain/storage.cpp @@ -24,6 +24,8 @@ namespace ESMTerrain }; LandObject::LandObject() + : mLand(nullptr) + , mLoadFlags(0) { } diff --git a/components/terrain/quadtreenode.cpp b/components/terrain/quadtreenode.cpp index 0394adea7f..f4fc8df897 100644 --- a/components/terrain/quadtreenode.cpp +++ b/components/terrain/quadtreenode.cpp @@ -61,6 +61,7 @@ QuadTreeNode::QuadTreeNode(QuadTreeNode* parent, ChildDirection direction, float , mValidBounds(false) , mSize(size) , mCenter(center) + , mViewDataMap(nullptr) { for (unsigned int i=0; i<4; ++i) mNeighbours[i] = 0; diff --git a/components/widgets/windowcaption.cpp b/components/widgets/windowcaption.cpp index bcb0a7c125..1c8fb5608d 100644 --- a/components/widgets/windowcaption.cpp +++ b/components/widgets/windowcaption.cpp @@ -8,6 +8,7 @@ namespace Gui WindowCaption::WindowCaption() : mLeft(NULL) , mRight(NULL) + , mClient(NULL) { } From 441463327c23d0a49961e403f29e81ebb19b2ee1 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Mon, 25 Jun 2018 09:57:40 +0400 Subject: [PATCH 17/29] Validate map size --- apps/openmw/mwgui/hud.cpp | 4 +++- apps/openmw/mwgui/mapwindow.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwgui/hud.cpp b/apps/openmw/mwgui/hud.cpp index 23eb499dee..1841303f25 100644 --- a/apps/openmw/mwgui/hud.cpp +++ b/apps/openmw/mwgui/hud.cpp @@ -158,7 +158,9 @@ namespace MWGui getWidget(mCrosshair, "Crosshair"); - LocalMapBase::init(mMinimap, mCompass, Settings::Manager::getInt("local map hud widget size", "Map"), Settings::Manager::getInt("local map cell distance", "Map")); + int mapSize = std::max(1, Settings::Manager::getInt("local map hud widget size", "Map")); + int cellDistance = std::max(1, Settings::Manager::getInt("local map cell distance", "Map")); + LocalMapBase::init(mMinimap, mCompass, mapSize, cellDistance); mMainWidget->eventMouseButtonClick += MyGUI::newDelegate(this, &HUD::onWorldClicked); mMainWidget->eventMouseMove += MyGUI::newDelegate(this, &HUD::onWorldMouseOver); diff --git a/apps/openmw/mwgui/mapwindow.cpp b/apps/openmw/mwgui/mapwindow.cpp index d3c1ec292a..c1ff9510d3 100644 --- a/apps/openmw/mwgui/mapwindow.cpp +++ b/apps/openmw/mwgui/mapwindow.cpp @@ -679,7 +679,9 @@ namespace MWGui mEventBoxLocal->eventMouseButtonPressed += MyGUI::newDelegate(this, &MapWindow::onDragStart); mEventBoxLocal->eventMouseButtonDoubleClick += MyGUI::newDelegate(this, &MapWindow::onMapDoubleClicked); - LocalMapBase::init(mLocalMap, mPlayerArrowLocal, Settings::Manager::getInt("local map widget size", "Map"), Settings::Manager::getInt("local map cell distance", "Map")); + int mapSize = std::max(1, Settings::Manager::getInt("local map widget size", "Map")); + int cellDistance = std::max(1, Settings::Manager::getInt("local map cell distance", "Map")); + LocalMapBase::init(mLocalMap, mPlayerArrowLocal, mapSize, cellDistance); mGlobalMap->setVisible(mGlobal); mLocalMap->setVisible(!mGlobal); From 7dff8d8fe28c6d3d95f9d3c90070ad757c7c84b3 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Mon, 25 Jun 2018 10:26:58 +0400 Subject: [PATCH 18/29] Check cell for null --- apps/openmw/mwworld/worldimp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index 83d27f6d83..9de4da1ee2 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1179,8 +1179,8 @@ namespace MWWorld } else { - bool currCellActive = mWorldScene->isCellActive(*currCell); - bool newCellActive = mWorldScene->isCellActive(*newCell); + bool currCellActive = currCell && mWorldScene->isCellActive(*currCell); + bool newCellActive = newCell && mWorldScene->isCellActive(*newCell); if (!currCellActive && newCellActive) { newPtr = currCell->moveTo(ptr, newCell); From 97d8cc0efe4df7d618d31b666e3d97d555ffa9be Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Mon, 25 Jun 2018 11:21:00 +0400 Subject: [PATCH 19/29] Check if the local was not found, just for sure --- apps/openmw/mwscript/locals.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwscript/locals.cpp b/apps/openmw/mwscript/locals.cpp index 9dd9d338ed..64f3058eb2 100644 --- a/apps/openmw/mwscript/locals.cpp +++ b/apps/openmw/mwscript/locals.cpp @@ -240,6 +240,10 @@ namespace MWScript char type = declarations.getType (iter->first); int index2 = declarations.getIndex (iter->first); + // silently ignore locals that don't exist anymore + if (type == ' ' || index2 == -1) + continue; + try { switch (type) @@ -247,8 +251,6 @@ namespace MWScript case 's': mShorts.at (index2) = iter->second.getInteger(); break; case 'l': mLongs.at (index2) = iter->second.getInteger(); break; case 'f': mFloats.at (index2) = iter->second.getFloat(); break; - - // silently ignore locals that don't exist anymore } } catch (...) From ae4cb0c3ee279ce05aaeba6d5c9a827d0c02a0b3 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 13:50:45 +0000 Subject: [PATCH 20/29] no need for macos_qt_formula since on osx there is no more qt4, just qt5 --- .travis.yml | 1 - CI/before_install.osx.sh | 2 +- CI/before_script.osx.sh | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d2e6a795b..c6facef2ba 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,6 @@ env: # The next declaration is the encrypted COVERITY_SCAN_TOKEN, created # via the "travis encrypt" command using the project repo's public key - secure: "jybGzAdUbqt9vWR/GEnRd96BgAi/7Zd1+2HK68j/i/8+/1YH2XxLOy4Jv/DUBhBlJIkxs/Xv8dRcUlFOclZDHX1d/9Qnsqd3oUVkD7k1y7cTOWy9TBQaE/v/kZo3LpzA3xPwwthrb0BvqIbOfIELi5fS5s8ba85WFRg3AX70wWE=" - - macos_qt_formula=qt addons: apt: sources: diff --git a/CI/before_install.osx.sh b/CI/before_install.osx.sh index 47f4021cfe..48e2ef6bae 100755 --- a/CI/before_install.osx.sh +++ b/CI/before_install.osx.sh @@ -4,7 +4,7 @@ brew update brew outdated cmake || brew upgrade cmake brew outdated pkgconfig || brew upgrade pkgconfig -brew install $macos_qt_formula +brew install qt curl https://downloads.openmw.org/osx/dependencies/openmw-deps-100d2e0.zip -o ~/openmw-deps.zip unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null diff --git a/CI/before_script.osx.sh b/CI/before_script.osx.sh index 2d1cf8729d..8ee01b652d 100755 --- a/CI/before_script.osx.sh +++ b/CI/before_script.osx.sh @@ -4,7 +4,7 @@ export CXX=clang++ export CC=clang DEPENDENCIES_ROOT="/private/tmp/openmw-deps/openmw-deps" -QT_PATH=`brew --prefix $macos_qt_formula` +QT_PATH=`brew --prefix qt` mkdir build cd build From 308d78e3dafab71ee8ba173e8ed7fb35a7a41e2f Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 13:54:37 +0000 Subject: [PATCH 21/29] only download via curl if file on server is different than what is currently cached on VM. --- .gitlab-ci.yml | 2 +- CI/before_install.osx.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 83a6ab63f7..97070136f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ MacOS: allow_failure: true script: #- macos_qt_formula=qt - #- CI/before_install.osx.sh + - CI/before_install.osx.sh - CI/before_script.osx.sh - make -j2 - DESTDIR=artifacts make install diff --git a/CI/before_install.osx.sh b/CI/before_install.osx.sh index 48e2ef6bae..c4793d1cf6 100755 --- a/CI/before_install.osx.sh +++ b/CI/before_install.osx.sh @@ -6,5 +6,5 @@ brew outdated cmake || brew upgrade cmake brew outdated pkgconfig || brew upgrade pkgconfig brew install qt -curl https://downloads.openmw.org/osx/dependencies/openmw-deps-100d2e0.zip -o ~/openmw-deps.zip +curl -fSL -R -J https://downloads.openmw.org/osx/dependencies/openmw-deps-100d2e0.zip -o ~/openmw-deps.zip unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null From 9e2c6d9fe1cb142f9e72f1f2b9a800d44e98f8ce Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 13:57:13 +0000 Subject: [PATCH 22/29] actually step into the build directory and build! --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97070136f9..8d3ebccbe8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ MacOS: #- macos_qt_formula=qt - CI/before_install.osx.sh - CI/before_script.osx.sh - - make -j2 + - cd build; make -j2 - DESTDIR=artifacts make install artifacts: paths: From e068ee353372676279cf65708e861d5733007f44 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 14:01:10 +0000 Subject: [PATCH 23/29] tell unzip to overwrite all files --- CI/before_install.osx.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/before_install.osx.sh b/CI/before_install.osx.sh index c4793d1cf6..2ab996b10f 100755 --- a/CI/before_install.osx.sh +++ b/CI/before_install.osx.sh @@ -7,4 +7,4 @@ brew outdated pkgconfig || brew upgrade pkgconfig brew install qt curl -fSL -R -J https://downloads.openmw.org/osx/dependencies/openmw-deps-100d2e0.zip -o ~/openmw-deps.zip -unzip ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null +unzip -o ~/openmw-deps.zip -d /private/tmp/openmw-deps > /dev/null From 06eb9539bd219a41664e90bd7d5c95103eed0c04 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 14:51:55 +0000 Subject: [PATCH 24/29] Let make install do it's thing, it's more reasonable on macos and let's only archive that. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8d3ebccbe8..9ca719efe5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,7 +41,7 @@ MacOS: - CI/before_install.osx.sh - CI/before_script.osx.sh - cd build; make -j2 - - DESTDIR=artifacts make install + - make install artifacts: paths: - - build/artifacts/ \ No newline at end of file + - /usr/local/OpenMW.app \ No newline at end of file From c1aee49b763f51657ae742967f42ae13fddf323b Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 15:09:51 +0000 Subject: [PATCH 25/29] clean up after our previous build. --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 9ca719efe5..986e2d2aa7 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,11 +37,11 @@ MacOS: stage: build allow_failure: true script: - #- macos_qt_formula=qt + - sudo rm -fr /usr/local/Openmw.app # clean up after previous build - CI/before_install.osx.sh - CI/before_script.osx.sh - cd build; make -j2 - - make install + - sudo make install artifacts: paths: - /usr/local/OpenMW.app \ No newline at end of file From dd60b8f1791edb309584378e63a71238902aef72 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 15:18:18 +0000 Subject: [PATCH 26/29] only delete files inside OpenMW.app dir --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 986e2d2aa7..6ffe17a706 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,11 +37,11 @@ MacOS: stage: build allow_failure: true script: - - sudo rm -fr /usr/local/Openmw.app # clean up after previous build + - rm -fr /usr/local/Openmw.app/* # clean up after previous build - CI/before_install.osx.sh - CI/before_script.osx.sh - cd build; make -j2 - - sudo make install + - make install artifacts: paths: - /usr/local/OpenMW.app \ No newline at end of file From cfcd9c3fc63e384a919add2c136294fe63577c90 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 15:36:53 +0000 Subject: [PATCH 27/29] What happens when we don't make install? --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6ffe17a706..14348f5c26 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,7 +41,7 @@ MacOS: - CI/before_install.osx.sh - CI/before_script.osx.sh - cd build; make -j2 - - make install + # - make install artifacts: paths: - /usr/local/OpenMW.app \ No newline at end of file From 9e7731259dc10e7e5d477c0950cd61698fa5847a Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 15:40:06 +0000 Subject: [PATCH 28/29] what if we try make -j2 package ? --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 14348f5c26..1d7502bb85 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,7 +40,7 @@ MacOS: - rm -fr /usr/local/Openmw.app/* # clean up after previous build - CI/before_install.osx.sh - CI/before_script.osx.sh - - cd build; make -j2 + - cd build; make -j2 package # - make install artifacts: paths: From 4d6ca2c387c1e41ee8f226f33fe2eabfb2b03706 Mon Sep 17 00:00:00 2001 From: Bret Curtis Date: Tue, 26 Jun 2018 17:45:20 +0000 Subject: [PATCH 29/29] preserve dmg artifact --- .gitlab-ci.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d7502bb85..d815c7d77f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -37,11 +37,10 @@ MacOS: stage: build allow_failure: true script: - - rm -fr /usr/local/Openmw.app/* # clean up after previous build + - rm -fr build/* # remove anything in the build directory - CI/before_install.osx.sh - CI/before_script.osx.sh - cd build; make -j2 package - # - make install artifacts: paths: - - /usr/local/OpenMW.app \ No newline at end of file + - build/OpenMW-*.dmg \ No newline at end of file