mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-11 01:52:32 +01:00
Fix track origin being miscalculated for plugins on downward slopes
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
- Fix: [#21919] Non-recolourable cars still show colour picker.
|
||||
- Fix: [#23108] Missing pieces on Hypercoaster and Hyper-Twister, even with the ‘all drawable track pieces’ cheat enabled.
|
||||
- Fix: [#24013] Failure to load a scenario preview image (minimap) could lead to an uncaught exception error message.
|
||||
- Fix: [#24142] [Plugin] Track origin is miscalculated on downward slopes.
|
||||
|
||||
0.4.21 (2025-04-05)
|
||||
------------------------------------------------------------------------
|
||||
|
||||
@@ -774,7 +774,7 @@ std::optional<CoordsXYZD> GetTrackSegmentOrigin(const CoordsXYE& posEl)
|
||||
const auto& trackBlock = ted.sequences[sequenceIndex].clearance;
|
||||
CoordsXY trackBlockOffset = { trackBlock.x, trackBlock.y };
|
||||
coords += trackBlockOffset.Rotate(DirectionReverse(direction));
|
||||
coords.z -= trackBlock.z;
|
||||
coords.z += ted.sequences[0].clearance.z - trackBlock.z;
|
||||
|
||||
return CoordsXYZD(coords, direction);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user