Fix #12388: Vehicle::CopyVehicleConfigAndStatistics not releasing unit number (#12389)

This commit is contained in:
Jonathan G Rennison
2024-03-27 20:20:27 +00:00
committed by GitHub
parent b8b01818ca
commit 433484cda3
3 changed files with 13 additions and 2 deletions

View File

@@ -750,6 +750,8 @@ public:
void ResetRefitCaps();
void ReleaseUnitNumber();
/**
* Copy certain configurations and statistics of a vehicle after successful autoreplace/renew
* The function shall copy everything that cannot be copied by a command (like orders / group etc),
@@ -760,6 +762,7 @@ public:
{
this->CopyConsistPropertiesFrom(src);
this->ReleaseUnitNumber();
this->unitnumber = src->unitnumber;
this->current_order = src->current_order;