diff options
Diffstat (limited to 'sim')
-rw-r--r-- | sim/include/kurator/sim/HitPoints.h | 2 | ||||
-rw-r--r-- | sim/src/Builder.cpp | 2 | ||||
-rw-r--r-- | sim/src/HitPoints.cpp | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sim/include/kurator/sim/HitPoints.h b/sim/include/kurator/sim/HitPoints.h index 96b54b0..d63620d 100644 --- a/sim/include/kurator/sim/HitPoints.h +++ b/sim/include/kurator/sim/HitPoints.h @@ -9,7 +9,7 @@ namespace sim struct HitPoints { - double health; + double structure; void deal(double damage); bool is_alive() const; double total() const; 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; } |