Skip to content
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

CNavArea Modifiable Cost #2574

Open
ventz-lgtm opened this issue Jan 2, 2025 · 0 comments
Open

CNavArea Modifiable Cost #2574

ventz-lgtm opened this issue Jan 2, 2025 · 0 comments

Comments

@ventz-lgtm
Copy link

ventz-lgtm commented Jan 2, 2025

Details

From my testing, using the built-in nav path generator for PathFollower is massively faster than when a custom lua function is defined. I am going off the assumption that the built-in generator function is still the same as this: https://github.com/ValveSoftware/source-sdk-2013/blob/0d8dceea4310fde5706b3ce1c70609d72a38efdf/sp/src/game/server/nav_generate.cpp#L61

Can we get a simple cost multiplier variable which can be set on a CNavArea at runtime such that I can affect the cost of pathing over a certain area without needing to use the lua generator function, hence maintaining better performance.

My use case for this is wanting to increase the cost by 3 or 4 times for nav areas which are overlapped by closed doors, since the NPCs take time to open doors and it makes sense for them to pick paths with fewer doors.

Even somehow using the func_nav_avoid entity at runtime would be an unnecessary use of an edict, and has no customizable cost increase either. A simple change to the built-in generator to add a multiplier on the nav area should not affect performance much at all.

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

No branches or pull requests

1 participant