Merge branch 'master' into jgrpp

# Conflicts:
#	CMakeLists.txt
#	bin/ai/CMakeLists.txt
#	bin/game/CMakeLists.txt
#	src/ai/ai_info.cpp
#	src/company_base.h
#	src/economy.cpp
#	src/game/game_info.cpp
#	src/gfx_type.h
#	src/linkgraph/linkgraph_gui.cpp
#	src/palette.cpp
#	src/palette_func.h
#	src/saveload/saveload.h
#	src/saveload/vehicle_sl.cpp
#	src/ship_cmd.cpp
#	src/train_cmd.cpp
#	src/vehicle_base.h
#	src/window.cpp
#	src/window_func.h
This commit is contained in:
Jonathan G Rennison
2024-02-26 18:19:34 +00:00
115 changed files with 3467 additions and 2164 deletions

View File

@@ -916,7 +916,7 @@ public:
* and that shall not be resetted for the new vehicle.
* @param src The old vehicle
*/
inline void CopyVehicleConfigAndStatistics(const Vehicle *src)
inline void CopyVehicleConfigAndStatistics(Vehicle *src)
{
this->CopyConsistPropertiesFrom(src);
@@ -936,6 +936,8 @@ public:
if (HasBit(src->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME)) SetBit(this->vehicle_flags, VF_AUTOFILL_PRES_WAIT_TIME);
this->service_interval = src->service_interval;
src->unitnumber = 0;
}
@@ -1670,19 +1672,6 @@ public:
}
};
/** Generates sequence of free UnitID numbers */
struct FreeUnitIDGenerator {
bool *cache; ///< array of occupied unit id numbers
UnitID maxid; ///< maximum ID at the moment of constructor call
UnitID curid; ///< last ID returned; 0 if none
FreeUnitIDGenerator(VehicleType type, CompanyID owner);
UnitID NextID();
/** Releases allocated memory */
~FreeUnitIDGenerator() { free(this->cache); }
};
/** Sentinel for an invalid coordinate. */
static const int32_t INVALID_COORD = 0x7fffffff;