Initial support for multi-part (pseudo-articulated) ships

This commit is contained in:
Jonathan G Rennison
2023-03-14 00:16:31 +00:00
parent 5718730d68
commit 211fdd62b2
16 changed files with 216 additions and 58 deletions

View File

@@ -1727,7 +1727,7 @@ private:
{
this->can_do_refit = false;
this->can_do_autorefit = false;
for (const Vehicle *w = this->vehicle; w != nullptr; w = w->IsGroundVehicle() ? w->Next() : nullptr) {
for (const Vehicle *w = this->vehicle; w != nullptr; w = w->IsArticulatedCallbackVehicleType() ? w->Next() : nullptr) {
if (IsEngineRefittable(w->engine_type)) this->can_do_refit = true;
if (HasBit(Engine::Get(w->engine_type)->info.misc_flags, EF_AUTO_REFIT)) this->can_do_autorefit = true;
}