Fix physics tick counter

The counter is now incremented at the start of a physics tick rather than the end.
This commit is contained in:
lawnjelly
2024-06-09 15:34:23 +01:00
parent e2c7073b4e
commit 40961d62e2
4 changed files with 6 additions and 5 deletions

View File

@ -98,7 +98,7 @@ protected:
struct InterpolationData {
Transform2D xform_curr;
Transform2D xform_prev;
uint32_t last_update_physics_tick = 0;
uint32_t last_update_physics_tick = UINT32_MAX;
} _interpolation_data;
protected:

View File

@ -70,7 +70,7 @@ class NavigationAgent2D : public Node {
bool target_reached = false;
bool navigation_finished = true;
// No initialized on purpose
uint32_t update_frame_id = 0;
uint32_t update_frame_id = UINT32_MAX;
protected:
static void _bind_methods();