From 6398565e9ce51f86c02ac4db821ffe181452037f Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 8 Jan 2023 00:48:38 +0100 Subject: Extracted alive state check from battle to hitpoints to hide it away --- sim/src/BaseBattle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sim/src/BaseBattle.cpp') diff --git a/sim/src/BaseBattle.cpp b/sim/src/BaseBattle.cpp index 224c16c..f195181 100644 --- a/sim/src/BaseBattle.cpp +++ b/sim/src/BaseBattle.cpp @@ -103,7 +103,7 @@ BaseBattle::kill_off_dead() { auto view = _registry.view(); for (auto&& [entity, points] : view.each()) { - if (points.health > 0.0) + if (points.is_alive()) continue; if (_registry.all_of(entity)) { const auto& [identifier, team] = _registry.get(entity); -- cgit v1.1