You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//-----------------------------------------------------------------------------// 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 empty!!!)//-----------------------------------------------------------------------------voidDetour_Reload()
{
// Destroy and free the memory for all NavMesh hulls.for (int i = 0; i < MAX_HULLS; i++)
{
dtNavMesh* nav = GetNavMeshForHull(i);
if (nav)
{
v_Detour_FreeNavMesh(nav);
MemAllocSingleton()->Free(nav);
}
}
// Reload NavMesh for current level.v_Detour_LevelInit();
}
ConCommand::Create("navmesh_reload", "Reloads the NavMesh for all hulls.", FCVAR_RELEASE, Detour_Reload_f, nullptr);
command hot swaps NavMesh for all hulls while the game is running. If you implement this in Northstar, you no longer need to restart the level to reload the NavMesh
The text was updated successfully, but these errors were encountered:
Suggested by @Mauler125 in https://discord.com/channels/920776187884732556/925135799798874192/1037664012579643412
The text was updated successfully, but these errors were encountered: