From c71a513401daad14cf899dbf7d9bd5d74f3a92e0 Mon Sep 17 00:00:00 2001 From: Vsevolod Kremianskii Date: Tue, 23 Mar 2021 09:39:27 +0700 Subject: [PATCH] ci: Remove Azure from APT sources This should fix the GitHub actions build. --- .github/workflows/cmake.yml | 5 ++++- .github/workflows/coverity-scan.yml | 5 ++++- src/render/model/animatedproperty.h | 4 ++-- src/scene/node/modelnodescenenode.cpp | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 1eaa980c..7233490b 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -16,7 +16,10 @@ jobs: - uses: actions/checkout@v2 - name: Install dependencies - run: sudo apt install libboost-all-dev libsdl2-dev libglew-dev libopenal-dev libmad0-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev + run: > + sudo sed -i 's/azure\.//' /etc/apt/sources.list && + sudo apt-get update && + sudo apt install libboost-all-dev libsdl2-dev libglew-dev libopenal-dev libmad0-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/build diff --git a/.github/workflows/coverity-scan.yml b/.github/workflows/coverity-scan.yml index 06c758cf..ebdeaa3d 100644 --- a/.github/workflows/coverity-scan.yml +++ b/.github/workflows/coverity-scan.yml @@ -16,7 +16,10 @@ jobs: - uses: actions/checkout@v2 - name: Install dependencies - run: sudo apt install libboost-all-dev libsdl2-dev libglew-dev libopenal-dev libmad0-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev + run: > + sudo sed -i 's/azure\.//' /etc/apt/sources.list && + sudo apt-get update && + sudo apt install libboost-all-dev libsdl2-dev libglew-dev libopenal-dev libmad0-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev - name: Create Build Environment run: cmake -E make_directory ${{github.workspace}}/build diff --git a/src/render/model/animatedproperty.h b/src/render/model/animatedproperty.h index d80435c4..4cb4f985 100644 --- a/src/render/model/animatedproperty.h +++ b/src/render/model/animatedproperty.h @@ -50,8 +50,8 @@ public: bool getByTime(float time, V &value) const { if (_keyframes.empty()) return false; - const pair *frame1 = &_keyframes[0]; - const pair *frame2 = &_keyframes[0]; + const std::pair *frame1 = &_keyframes[0]; + const std::pair *frame2 = &_keyframes[0]; for (auto it = _keyframes.begin(); it != _keyframes.end(); ++it) { if (it->first >= time) { frame2 = &*it; diff --git a/src/scene/node/modelnodescenenode.cpp b/src/scene/node/modelnodescenenode.cpp index aee328ac..48aa1495 100644 --- a/src/scene/node/modelnodescenenode.cpp +++ b/src/scene/node/modelnodescenenode.cpp @@ -134,7 +134,7 @@ void ModelNodeSceneNode::update(float dt) { bool ModelNodeSceneNode::shouldRender() const { shared_ptr mesh(_modelNode->mesh()); - if (!mesh || !mesh->shouldRender() /* || _modelNode->alpha() == 0.0f */) return false; + if (!mesh || !mesh->shouldRender() || _modelNode->alphas().getByKeyframeOrDefault(0, 1.0f) == 0.0f) return false; return _modelNode->isAABB() ? g_debugWalkmesh : true; }