From 089dddf2c460e448b1d0a201bee41a802ca5ce93 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Fri, 5 Jul 2024 15:00:03 +0200 Subject: [PATCH] Server: add note for finishing NavMesh hotswap implementation this has to be done in the future to finalize this, for the time being, a workaround in scripts can be implemented using CodeCallback_OnNavMeshHotSwapBegin and CodeCallback_OnNavMeshHotSwapEnd (destroyingon begin, restoring on end). --- src/game/server/ai_utility.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/game/server/ai_utility.cpp b/src/game/server/ai_utility.cpp index 98de8a73..7fb78eee 100644 --- a/src/game/server/ai_utility.cpp +++ b/src/game/server/ai_utility.cpp @@ -127,6 +127,10 @@ bool Detour_IsLoaded() //----------------------------------------------------------------------------- // Purpose: hot swaps the NavMesh with the current files on the disk // (All hulls will be reloaded! If NavMesh for hull no longer exist, it will be kept empty!!!) +// +// TODO: Currently when hotswapping, the game crashes if there's AI in the world. +// Loop over all CAI_BaseNPC instances, and call m_pPathfinder->m_navQuery.init() +// to clear NavMesh cache !!! //----------------------------------------------------------------------------- void Detour_HotSwap() {