Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ cmake_policy(SET CMP0141 NEW)
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<IF:$<CONFIG:Debug>,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)
Expand Down
4 changes: 2 additions & 2 deletions include/NavKit/NavKitConfig.h
Original file line number Diff line number Diff line change
@@ -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"
3 changes: 1 addition & 2 deletions include/NavKit/module/Airg.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ class Airg {

static int visibilityDataSize(const ReasoningGrid* reasoningGrid, int waypointIndex);

void build();

static void addWaypointGeometry(std::vector<AirgVertex>& triVerts, std::vector<AirgVertex>& lineVerts,
const Waypoint& waypoint, bool selected, const glm::vec4& color,
bool forceFan = false);
Expand Down Expand Up @@ -116,6 +114,7 @@ class Airg {

void handleBuildAirgClicked();

static void buildAirg(Airg* airg);
[[nodiscard]] bool canEnterConnectWaypointMode() const;

void handleConnectWaypointClicked();
Expand Down
13 changes: 10 additions & 3 deletions src/module/Airg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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() {
Expand Down
Loading