Skip to content

TheNavMesh.IsAnalyzed() always returns false #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
CookieCat45 opened this issue Mar 17, 2025 · 1 comment · Fixed by #68
Closed

TheNavMesh.IsAnalyzed() always returns false #67

CookieCat45 opened this issue Mar 17, 2025 · 1 comment · Fixed by #68

Comments

@CookieCat45
Copy link
Contributor

CookieCat45 commented Mar 17, 2025

TheNavMesh.IsAnalyzed() native from nav.inc always returns false. On a map with an analyzed nav mesh, despite the message The nav mesh needs a full nav_analyze not appearing in the server console on map start or when the nav_load command is ran, the native returns false.

#include <sourcemod>
#include <cbasenpc>

public void OnMapStart()
{
    if (!TheNavMesh.IsAnalyzed()) // always returns false
    {
        char mapName[128];
        GetCurrentMap(mapName, sizeof(mapName));
        LogError("The map \"%s\" needs a nav_analyze", mapName);
    }
}
sm plugins reload nav_analyze
L 03/17/2025 - 17:19:15: [nav_analyze.smx] The map "rf2_sawmill_r1" needs a nav_analyze
[SM] Plugin nav_analyze.smx reloaded successfully.
nav_load
L 03/17/2025 - 17:19:20: [CBASENPC] Parsed 2215 nav areas.
@KitRifty
Copy link
Collaborator

Hi! Thanks for the report. I've made a fix for this here: #68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants