Skip to content

Commit

Permalink
refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Jnnshschl committed Jan 26, 2024
1 parent d1e7a94 commit 715da0a
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
4 changes: 4 additions & 0 deletions AmeisenNavigation.Tester/AmeisenNavigation.Tester.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,8 @@
<PackageReference Include="System.Drawing.Common" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
<Folder Include="Properties\PublishProfiles\" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
https://go.microsoft.com/fwlink/?LinkID=208121.
https://go.microsoft.com/fwlink/?LinkID=208121.
-->
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>x86</Platform>
<PublishDir>bin\Release\net5.0-windows\publish\</PublishDir>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net8.0-windows7.0\publish\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net5.0-windows</TargetFramework>
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
<_TargetId>Folder</_TargetId>
<TargetFramework>net8.0-windows7.0</TargetFramework>
<SelfContained>false</SelfContained>
<PublishSingleFile>True</PublishSingleFile>
<PublishReadyToRun>False</PublishReadyToRun>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion AmeisenNavigation/src/AmeisenNavigation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ bool AmeisenNavigation::TryGetClientAndQuery(size_t clientId, int mapId, Ameisen
if (!IsValidClient(clientId)) { return false; }

client = Clients.at(clientId);
auto& format = client->GetMmapFormat();
auto format = client->GetMmapFormat();

// we already have a query
if (query = client->GetNavmeshQuery(mapId)) { return true; }
Expand Down
7 changes: 2 additions & 5 deletions AmeisenNavigation/src/Smoothing/CatmullRomSpline.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,9 @@ namespace CatmullRomSpline

ScaleAndAddVector3(B1, (t2 - t) / (t2 - t1), B2, (t - t1) / (t2 - t1), C);

if (!std::isnan(C.x) && !std::isnan(C.y) && !std::isnan(C.z))
{
if (*outputSize > maxIndex) { return; }
InsertVector3(output, *outputSize, &C, 0);

InsertVector3(output, *outputSize, &C, 0);
}
if (*outputSize > outputMaxSize - 1) { return; }
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions AmeisenNavigation/src/Utils/Path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ struct Path
{}

constexpr inline auto& operator[](int i) noexcept { return points[i]; }

constexpr inline Vector3* begin() const noexcept { return points; }
constexpr inline Vector3* end() const noexcept { return points + pointCount; }

constexpr inline int GetSpace() const noexcept { return maxSize - pointCount; }
};

0 comments on commit 715da0a

Please sign in to comment.