diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 11d3e08..df7dfb9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,6 +25,14 @@ jobs: with: submodules: recursive + - name: Restore vcpkg cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/extern/vcpkg/packages + key: vcpkg-${{ runner.os }}-${{ hashFiles('**/vcpkg.json', '**/vcpkg-configuration.json') }} + restore-keys: | + vcpkg-${{ runner.os }}- + - name: Setup VS environment uses: ilammy/msvc-dev-cmd@v1 with: @@ -62,6 +70,14 @@ jobs: with: submodules: recursive + - name: Restore vcpkg cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}/extern/vcpkg/packages + key: vcpkg-${{ runner.os }}-${{ hashFiles('**/vcpkg.json', '**/vcpkg-configuration.json') }} + restore-keys: | + vcpkg-${{ runner.os }}- + - name: Setup VS environment uses: ilammy/msvc-dev-cmd@v1 with: diff --git a/CMakeLists.txt b/CMakeLists.txt index 55c047a..ff09d1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_policy(SET CMP0141 NEW) set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$,EditAndContinue,ProgramDatabase>" CACHE STRING "MSVC debug information format") project( NavKit - VERSION 2.16.0 + VERSION 2.16.1 DESCRIPTION "An app to create NAVP and AIRG files for use with Hitman: World of Assassination" LANGUAGES CXX) set(CMAKE_CXX_STANDARD 20) diff --git a/include/NavKit/NavKitConfig.h b/include/NavKit/NavKitConfig.h index 25e6bb7..e82cf55 100644 --- a/include/NavKit/NavKitConfig.h +++ b/include/NavKit/NavKitConfig.h @@ -1,3 +1,3 @@ #define NavKit_VERSION_MAJOR "2" -#define NavKit_VERSION_MINOR "15" -#define NavKit_VERSION_PATCH "0" +#define NavKit_VERSION_MINOR "16" +#define NavKit_VERSION_PATCH "1" diff --git a/include/NavKit/module/Airg.h b/include/NavKit/module/Airg.h index 1241ed9..586865f 100644 --- a/include/NavKit/module/Airg.h +++ b/include/NavKit/module/Airg.h @@ -70,8 +70,6 @@ class Airg { static int visibilityDataSize(const ReasoningGrid* reasoningGrid, int waypointIndex); - void build(); - static void addWaypointGeometry(std::vector& triVerts, std::vector& lineVerts, const Waypoint& waypoint, bool selected, const glm::vec4& color, bool forceFan = false); @@ -116,6 +114,7 @@ class Airg { void handleBuildAirgClicked(); + static void buildAirg(Airg* airg); [[nodiscard]] bool canEnterConnectWaypointMode() const; void handleConnectWaypointClicked(); diff --git a/src/module/Airg.cpp b/src/module/Airg.cpp index 49535e5..88447f3 100644 --- a/src/module/Airg.cpp +++ b/src/module/Airg.cpp @@ -294,8 +294,10 @@ void Airg::handleBuildAirgClicked() { airgBuilding = true; delete reasoningGrid; reasoningGrid = new ReasoningGrid(); + airgDirty = true; + airgHitTestDirty = true; Logger::log(NK_INFO, "Building Airg from Airg"); - build(); + backgroundWorker.emplace(&Airg::buildAirg, this); } bool Airg::canEnterConnectWaypointMode() const { @@ -422,8 +424,13 @@ int Airg::visibilityDataSize(const ReasoningGrid* reasoningGrid, const int waypo return offset2 - offset1; } -void Airg::build() { - backgroundWorker.emplace(&GridGenerator::build, &GridGenerator::getInstance()); +void Airg::buildAirg(Airg* airg) { + GridGenerator::getInstance().build(); + airg->airgBuilding = false; + airg->airgLoaded = true; + airgDirty = true; + airgHitTestDirty = true; + Menu::updateMenuState(); } void Airg::renderAirg() {