From fe2cd6a09a0adc3bb1185119345a20168dcfafd5 Mon Sep 17 00:00:00 2001 From: maj00r Date: Mon, 19 Oct 2026 17:10:06 +0200 Subject: [PATCH] fix(track): portal tracks were saved as "track none" The export took the category of the track from the whole flag word, so a portal track, whose flag word carries 0x100 next to the category, was written as "track none". The loader then fails on that track with no segment. The category is now taken from the low four bits. --- world/Track.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/world/Track.cpp b/world/Track.cpp index 11b42e45..ba24fa9d 100644 --- a/world/Track.cpp +++ b/world/Track.cpp @@ -2528,9 +2528,9 @@ TTrack::export_as_text_( std::ostream &Output ) const { // type Output << ( eType == tt_Normal ? ( - iCategoryFlag == 1 ? "normal" : - iCategoryFlag == 2 ? "road" : - iCategoryFlag == 4 ? "river" : + ( iCategoryFlag & 15 ) == 1 ? "normal" : + ( iCategoryFlag & 15 ) == 2 ? "road" : + ( iCategoryFlag & 15 ) == 4 ? "river" : "none" ) : eType == tt_Switch ? "switch" : eType == tt_Cross ? "cross" :