Merge pull request #105067 from smix8/navmesh_sync

Move NavigationServer navmesh sync from main() to process()
This commit is contained in:
Thaddeus Crews 2025-04-14 19:39:51 -05:00
commit 756053f05f
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
3 changed files with 4 additions and 7 deletions

View file

@ -4646,13 +4646,6 @@ bool Main::iteration() {
XRServer::get_singleton()->_process();
#endif // XR_DISABLED
#ifndef NAVIGATION_2D_DISABLED
NavigationServer2D::get_singleton()->sync();
#endif // NAVIGATION_2D_DISABLED
#ifndef NAVIGATION_3D_DISABLED
NavigationServer3D::get_singleton()->sync();
#endif // NAVIGATION_3D_DISABLED
for (int iters = 0; iters < advance.physics_steps; ++iters) {
if (Input::get_singleton()->is_agile_input_event_flushing()) {
Input::get_singleton()->flush_buffered_events();

View file

@ -1262,6 +1262,8 @@ void GodotNavigationServer2D::process(double p_delta_time) {
// Will run reliably every rendered frame independent of the physics tick rate.
// Use for things that (only) need to update once per main loop iteration and rendered frame or is visible to the user.
// E.g. (final) sync of objects for this main loop iteration, updating rendered debug visuals, updating debug statistics, ...
sync();
}
void GodotNavigationServer2D::physics_process(double p_delta_time) {

View file

@ -1343,6 +1343,8 @@ void GodotNavigationServer3D::process(double p_delta_time) {
// Will run reliably every rendered frame independent of the physics tick rate.
// Use for things that (only) need to update once per main loop iteration and rendered frame or is visible to the user.
// E.g. (final) sync of objects for this main loop iteration, updating rendered debug visuals, updating debug statistics, ...
sync();
}
void GodotNavigationServer3D::physics_process(double p_delta_time) {