fix: changed get_is_health_safe to use integer division ipv float division
This commit is contained in:
parent
a2863006f7
commit
a5bde58e57
|
@ -116,7 +116,7 @@ bool UnitWorldState::get_is_in_range() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool UnitWorldState::get_is_health_safe() 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 {
|
gd::Vector3 UnitWorldState::get_parent_global_position() const {
|
||||||
|
|
Loading…
Reference in a new issue