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

Fix NavigationPolygon not updating consistently on rebakes #94362

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

smix8
Copy link
Contributor

@smix8 smix8 commented Jul 14, 2024

fixes #94358

Fixes that NavigationPolygon did not update in all cases because the internal NavigationMesh was not always unref and freed which blocked creating a new mesh later if nothing else freed it.

regression from #93426 that added the new set_data() function.

That new function was missing the unref() for the old internal NavigationMesh. Without the unref, if nothing else would trigger it, when the NavigationServer would later request the internal NavigationMesh the NavigationPolygon would not build a new version of its internal NavigationMesh and just return the old.

Fixes that NavigationPolygon did not update in all cases because the internal NavigationMesh was not always unref and freed which blocked creating a new mesh later if nothing else freed it.
@akien-mga akien-mga merged commit c77c41d into godotengine:master Jul 17, 2024
18 checks passed
@smix8 smix8 deleted the navpoly_unref_fix branch July 17, 2024 10:05
@akien-mga
Copy link
Member

Thanks!

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

Successfully merging this pull request may close these issues.

[4.3.beta3] NavigationAgent not working properly when baking at runtime.
2 participants