17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-20 15:04:54 +02:00

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.
This commit is contained in:
maj00r
2026-10-19 17:10:06 +02:00
parent 949965009b
commit fe2cd6a09a

View File

@@ -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" :