From 976c87d64daca8dec4a147707fa156b4a1381d76 Mon Sep 17 00:00:00 2001 From: XProger Date: Mon, 5 Feb 2018 04:50:58 +0300 Subject: [PATCH] #8 fix camera issues --- src/camera.h | 4 ++-- src/lara.h | 2 +- src/platform/android/app/CMakeLists.txt | 1 + src/platform/win/OpenLara.vcxproj | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/camera.h b/src/camera.h index c02d789..3f54b63 100644 --- a/src/camera.h +++ b/src/camera.h @@ -581,11 +581,11 @@ struct Camera : ICamera { traceClip(offset, to); } + move(to); + if (timer <= 0.0f) resetTarget(); - move(to); - mViewInv = mat4(eye.pos, target.pos, vec3(0, -1, 0)); } else updateFirstPerson(); diff --git a/src/lara.h b/src/lara.h index 00dac76..2fbc58d 100644 --- a/src/lara.h +++ b/src/lara.h @@ -1963,7 +1963,7 @@ struct Lara : Character { if (info.trigger == TR::Level::Trigger::COMBAT) break; - if (info.trigger == TR::Level::Trigger::SWITCH && info.trigInfo.timer && switchIsDown) + if (info.trigger == TR::Level::Trigger::SWITCH && info.trigInfo.timer && !switchIsDown) break; if (info.trigger == TR::Level::Trigger::SWITCH || cmd.args != camera->viewIndexLast) { diff --git a/src/platform/android/app/CMakeLists.txt b/src/platform/android/app/CMakeLists.txt index 8b74ba9..bd0efd8 100644 --- a/src/platform/android/app/CMakeLists.txt +++ b/src/platform/android/app/CMakeLists.txt @@ -7,6 +7,7 @@ add_library( game SHARED src/main/cpp/main.cpp ../../../libs/stb_vorbis/stb_vorbis.c ../../../libs/minimp3/minimp3.cpp + ../../../libs/tinf/tinflate.c ) include_directories(../../../) diff --git a/src/platform/win/OpenLara.vcxproj b/src/platform/win/OpenLara.vcxproj index 5dc2094..ac9ef95 100644 --- a/src/platform/win/OpenLara.vcxproj +++ b/src/platform/win/OpenLara.vcxproj @@ -94,7 +94,7 @@ Level3 Disabled - STB_VORBIS_NO_STDIO;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) Strict @@ -130,7 +130,7 @@ Full true true - MINIMAL;STB_VORBIS_NO_STDIO;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + MINIMAL;NOMINMAX;_CRT_SECURE_NO_WARNINGS;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) false false MultiThreaded