diff options
Diffstat (limited to 'sim/src')
-rw-r--r-- | sim/src/Builder.cpp | 2 | ||||
-rw-r--r-- | sim/src/HitPoints.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
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<AIState>(entity, 6000.0, Point{0.0, 0.0}); - registry.emplace<HitPoints>(entity, ship_type.base_health_points); + registry.emplace<HitPoints>(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; } |