fix(zone): a scene transition links the scenes of its first and last points

Scene transitions of versions 34-38 have five points. The client links
the scenes of the first and the last one (ZoneLoader::ReadZoneFile,
1.10.64: points[0] and points[count - 1], for every version); the scene
graph used the first two, so in those zones it linked a scene with the
one of the transition's second point instead.

Of the 130 five-point transitions on disk, six (all in one older client
zone) have a different scene at the second and last points; the rest
link the same scenes as before.
Live zones are unchanged.

Check in game: nothing to check (no live zone changes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Aaron Kimbrell
2026-09-29 05:57:09 -05:00
parent 6a8e8ece04
commit ee9c6288cb
2 changed files with 14 additions and 3 deletions

View File

@@ -63,6 +63,15 @@ TEST(ZoneScenesTests, LoadsTheConnectedScenes) {
EXPECT_TRUE(graph.Neighbours(9).empty());
}
// A 5-point transition (versions 34-38) links its first and last points' scenes
TEST(ZoneScenesTests, FivePointTransitionsLinkTheirEnds) {
SceneTransition transition;
for (const uint64_t scene : { 1, 2, 2, 2, 3 }) transition.points.push_back({ scene, {} });
const ZoneScenes::SceneGraph graph(Scenes({ 0, 1, 2, 3 }), { transition });
EXPECT_EQ(graph.Neighbours(1), (std::set<uint32_t>{ 3 }));
EXPECT_TRUE(graph.Neighbours(2).empty());
}
TEST(ZoneScenesTests, AddsTheScenesAroundThePlayerWhileTheReferenceIsOverridden) {
const ZoneScenes::SceneGraph graph(Scenes({ 0, 1, 2, 3, 4 }), { Transition(1, 2), Transition(3, 4) });
// Not overridden: only the reference point's scenes, wherever the player is