From a5bde58e5766c751444e68498659de79babaad35 Mon Sep 17 00:00:00 2001 From: Sara Date: Mon, 9 Sep 2024 21:24:17 +0200 Subject: [PATCH] fix: changed get_is_health_safe to use integer division ipv float division --- src/unit_world_state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/unit_world_state.cpp b/src/unit_world_state.cpp index 9cf7ab6..2f7fb5a 100644 --- a/src/unit_world_state.cpp +++ b/src/unit_world_state.cpp @@ -116,7 +116,7 @@ bool UnitWorldState::get_is_in_range() const { } bool UnitWorldState::get_is_health_safe() const { - return float(this->health->get_injury_current()) > (float(this->health->get_injury_max()) / 2.f); + return this->health->get_injury_current() > this->health->get_injury_max() / 2; } gd::Vector3 UnitWorldState::get_parent_global_position() const {