1
0
Fork 0

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

pull/13743/head
glx22 2025-03-05 04:21:36 +01:00
parent 51fd2853cb
commit ef96e45337
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();
}