Merge pull request #94039 from rburing/fix_physics_tickcounter
Fix physics tick counter
This commit is contained in:
@ -108,7 +108,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; // Ensure tick 0 is detected as a change.
|
||||
} _interpolation_data;
|
||||
|
||||
void _ensure_update_interpolation_data();
|
||||
|
||||
@ -671,8 +671,6 @@ void NavigationAgent2D::_update_navigation() {
|
||||
return;
|
||||
}
|
||||
|
||||
update_frame_id = Engine::get_singleton()->get_physics_frames();
|
||||
|
||||
Vector2 origin = agent_parent->get_global_position();
|
||||
|
||||
bool reload_path = false;
|
||||
@ -767,7 +765,6 @@ void NavigationAgent2D::_request_repath() {
|
||||
target_reached = false;
|
||||
navigation_finished = false;
|
||||
last_waypoint_reached = false;
|
||||
update_frame_id = 0;
|
||||
}
|
||||
|
||||
bool NavigationAgent2D::_is_last_waypoint() const {
|
||||
|
||||
@ -91,8 +91,6 @@ class NavigationAgent2D : public Node {
|
||||
bool target_reached = false;
|
||||
bool navigation_finished = true;
|
||||
bool last_waypoint_reached = false;
|
||||
// No initialized on purpose
|
||||
uint32_t update_frame_id = 0;
|
||||
|
||||
// Debug properties for exposed bindings
|
||||
bool debug_enabled = false;
|
||||
|
||||
Reference in New Issue
Block a user