From 85e4741a6b39e436befacaf9778619696c9c5a33 Mon Sep 17 00:00:00 2001 From: Aki Date: Sun, 8 Jan 2023 00:59:29 +0100 Subject: Renamed health to structure points where applicable --- sim/src/Builder.cpp | 2 +- sim/src/HitPoints.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'sim/src') diff --git a/sim/src/Builder.cpp b/sim/src/Builder.cpp index 053ae93..f1e4762 100644 --- a/sim/src/Builder.cpp +++ b/sim/src/Builder.cpp @@ -39,7 +39,7 @@ Builder::operator()(const universe::ShipType& ship_type, const int team) const ship_type.max_speed * 2.0, ship_type.max_speed * 3.0); registry.emplace(entity, 6000.0, Point{0.0, 0.0}); - registry.emplace(entity, ship_type.base_health_points); + registry.emplace(entity, ship_type.base_structure_points); return entity; } diff --git a/sim/src/HitPoints.cpp b/sim/src/HitPoints.cpp index 28cf7f7..bcb7e97 100644 --- a/sim/src/HitPoints.cpp +++ b/sim/src/HitPoints.cpp @@ -10,21 +10,21 @@ namespace sim void HitPoints::deal(double damage) { - health -= damage; + structure -= damage; } bool HitPoints::is_alive() const { - return health > 0.0; + return structure > 0.0; } double HitPoints::total() const { - return health; + return structure; } -- cgit v1.1