Add g_pNavMeshQuery signature to SDK

This commit is contained in:
Kawe Mazidjatari 2022-07-17 12:55:38 +02:00
parent ab8d0b8f57
commit 0026723aef
3 changed files with 9 additions and 4 deletions

View File

@ -1,6 +1,7 @@
#pragma once
#include "thirdparty/recast/detour/include/detourstatus.h"
#include "thirdparty/recast/detour/include/detournavmesh.h"
#include "thirdparty/recast/Detour/Include/DetourNavMeshQuery.h"
//-------------------------------------------------------------------------
// RUNTIME: DETOUR
@ -33,6 +34,7 @@ enum EHULL_SIZE
};
inline dtNavMesh** g_pNavMesh = nullptr;
inline dtNavMeshQuery* g_pNavMeshQuery = nullptr;
dtNavMesh* GetNavMeshForHull(int hull);
///////////////////////////////////////////////////////////////////////////////
class VRecast : public IDetour
@ -43,6 +45,7 @@ class VRecast : public IDetour
spdlog::debug("| FUN: dtNavMesh::addTile : {:#18x} |\n", p_dtNavMesh__addTile.GetPtr());
spdlog::debug("| FUN: dtNavMesh::isPolyReachable : {:#18x} |\n", p_dtNavMesh__isPolyReachable.GetPtr());
spdlog::debug("| VAR: g_pNavMesh[5] : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pNavMesh));
spdlog::debug("| VAR: g_pNavMeshQuery : {:#18x} |\n", reinterpret_cast<uintptr_t>(g_pNavMeshQuery));
spdlog::debug("+----------------------------------------------------------------+\n");
}
virtual void GetFun(void) const
@ -59,6 +62,8 @@ class VRecast : public IDetour
{
g_pNavMesh = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x54\x24\x00\x48\x89\x4C\x24\x00\x55\x53\x56\x57\x41\x54\x41\x55\x41\x56\x41\x57\x48\x8D\x6C\x24\x00\x48\x81\xEC\x00\x00\x00\x00\x48\x8B\x02"), "xxxx?xxxx?xxxxxxxxxxxxxxxx?xxx????xxx")
.FindPatternSelf("48 8D 3D").ResolveRelativeAddressSelf(0x3, 0x7).RCast<dtNavMesh**>();
g_pNavMeshQuery = g_mGameDll.FindPatternSIMD(reinterpret_cast<rsig_t>("\x48\x89\x5C\x24\x00\x48\x89\x6C\x24\x00\x56\x57\x41\x56\x48\x81\xEC\x00\x00\x00\x00\x48\x63\xD9"), "xxxx?xxxx?xxxxxxx????xxx")
.FindPatternSelf("48 89 0D").ResolveRelativeAddressSelf(0x3, 0x7).RCast<dtNavMeshQuery*>();
}
virtual void GetCon(void) const { }
virtual void Attach(void) const { }

View File

@ -47,14 +47,14 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(SolutionDir)r5dev\;$(IncludePath);</IncludePath>
<IncludePath>$(SolutionDir)r5dev\;$(SolutionDir)r5dev\thirdparty\recast\;$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\$(ProjectName)\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)r5dev\;$(IncludePath);</IncludePath>
<IncludePath>$(SolutionDir)r5dev\;$(SolutionDir)r5dev\thirdparty\recast\;$(IncludePath)</IncludePath>
<LibraryPath>$(LibraryPath)</LibraryPath>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)build\$(ProjectName)\$(Configuration)\</IntDir>

View File

@ -562,7 +562,7 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<IncludePath>$(SolutionDir)r5dev\;$(IncludePath);$(DXSDK_DIR)Include</IncludePath>
<IncludePath>$(IncludePath);$(DXSDK_DIR)Include;$(SolutionDir)r5dev\;$(SolutionDir)r5dev\thirdparty\recast\</IncludePath>
<LibraryPath>$(LibraryPath);$(DXSDK_DIR)Lib\x64</LibraryPath>
<TargetName>gamesdk</TargetName>
<OutDir>$(SolutionDir)bin\$(Configuration)\</OutDir>
@ -571,7 +571,7 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<IncludePath>$(SolutionDir)r5dev\;$(IncludePath);$(DXSDK_DIR)Include</IncludePath>
<IncludePath>$(IncludePath);$(DXSDK_DIR)Include;$(SolutionDir)r5dev\;$(SolutionDir)r5dev\thirdparty\recast\</IncludePath>
<LibraryPath>$(LibraryPath);$(DXSDK_DIR)Lib\x64</LibraryPath>
<TargetName>gamesdk</TargetName>
<ReferencePath>$(VC_ReferencesPath_x64);</ReferencePath>