From 67b3a35f1f4933f709224092b87abcdff1bbe1b6 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 7 Nov 2024 22:24:38 +0100 Subject: [PATCH] compatibility with old portal maps which indexed faces differently --- mapeditor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mapeditor.cpp b/mapeditor.cpp index 633320bf..a9e387aa 100644 --- a/mapeditor.cpp +++ b/mapeditor.cpp @@ -1144,6 +1144,10 @@ EX namespace mapstream { auto& cw = (k==1 ? p.cw1 : p.cw2); cw.at = cellbyid[id]; cw.spin = fixspin(relspin[id], spin, cw.at->type, f.vernum); + /* compatibility with old portal maps which indexed faces differently */ + if(mproduct && f.vernum <= 0xAA0F && cw.spin == cw.at->type - 1) { + p.spin += (k == 2 ? -1 : 1) * (bt::in() ? -1 : 1); + } } } #endif