diff --git a/engine/src/components/afterburner.cpp b/engine/src/components/afterburner.cpp index 57aefb77c..160afd4b7 100644 --- a/engine/src/components/afterburner.cpp +++ b/engine/src/components/afterburner.cpp @@ -48,6 +48,7 @@ void Afterburner::Load(std::string upgrade_key, double consumption = UnitCSVFactory::GetVariable(unit_key, "Afterburner_Usage_Cost", 1.0); SetConsumption(consumption); + // We calculate percent operational as a simple average operational = (thrust.Percent() + speed.Percent()) / 2 * 100; } @@ -81,6 +82,7 @@ void Afterburner::Damage() { thrust.RandomDamage(); speed.RandomDamage(); + // We calculate percent operational as a simple average operational = (thrust.Percent() + speed.Percent()) / 2 * 100; } diff --git a/engine/src/components/drive.cpp b/engine/src/components/drive.cpp index 64c72cb14..0c3a1aa20 100644 --- a/engine/src/components/drive.cpp +++ b/engine/src/components/drive.cpp @@ -97,6 +97,7 @@ void Drive::Load(std::string upgrade_key, speed = Resource(UnitCSVFactory::GetVariable(unit_key, "Default_Speed_Governor", std::string("0.0")), game_speed, minimal_drive_functionality); + // We calculate percent operational as a simple average operational = (yaw.Percent() + pitch.Percent() + roll.Percent() + lateral.Percent() + vertical.Percent() + forward.Percent() + retro.Percent() + speed.Percent() + @@ -170,6 +171,7 @@ void Drive::Damage() { max_roll_left.RandomDamage(); max_roll_right.RandomDamage(); + // We calculate percent operational as a simple average operational = (yaw.Percent() + pitch.Percent() + roll.Percent() + lateral.Percent() + vertical.Percent() + forward.Percent() + retro.Percent() + speed.Percent() +