1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-25 15:39:09 +00:00

Fix #13729, f8b1e30: Incorrect conversion of EngineFlags to EngineFlag (#13743)

This commit is contained in:
Loïc Guilloux
2025-03-05 10:12:06 +01:00
committed by GitHub
parent 0cfcc07ee6
commit 7723625823
2 changed files with 3 additions and 3 deletions

View File

@@ -191,8 +191,8 @@ struct EngineInfo {
* Engine.flags is a bitmask, with the following values.
*/
enum class EngineFlag : uint8_t {
Available = 1, ///< This vehicle is available to everyone.
ExclusivePreview = 2, ///< This vehicle is in the exclusive preview stage, either being used or being offered to a company.
Available = 0, ///< This vehicle is available to everyone.
ExclusivePreview = 1, ///< This vehicle is in the exclusive preview stage, either being used or being offered to a company.
};
using EngineFlags = EnumBitSet<EngineFlag, uint8_t>;

View File

@@ -82,7 +82,7 @@ struct ENGNChunkHandler : ChunkHandler {
if (IsSavegameVersionBefore(SLV_179)) {
/* preview_company_rank was replaced with preview_company and preview_asked.
* Just cancel any previews. */
e->flags.Reset(EngineFlag{4}); // ENGINE_OFFER_WINDOW_OPEN
e->flags.Reset(EngineFlag{2}); // ENGINE_OFFER_WINDOW_OPEN
e->preview_company = CompanyID::Invalid();
e->preview_asked.Set();
}