Fix checkpoint normals, morph pickup deduplication, and final championship standings screen

This commit is contained in:
Luxferre committed 2026-12-01 20:45:13 +02:00
1 parent bbd701b716
commit 9f276a432b
8 files changed
+460 -63

No files matched your search

+24
View File
@@ -69,10 +69,34 @@ int main() {
CHECK(lvl.checkpoints[0].index == 0);
for (const auto& cp : lvl.checkpoints) {
CHECK(cp.x0 != cp.x1 || cp.z0 != cp.z1);
Vec2 seg(cp.x1 - cp.x0, cp.z1 - cp.z0);
float slen = seg.len();
CHECK(slen > 0.5f);
CHECK(std::abs(cp.dir.len() - 1.0f) < 1e-3f);
CHECK(std::abs(cp.dir.dot(seg) / slen) < 1e-3f);
}
if (l == 3) {
CHECK(lvl.checkpoints[1].dir.y < -0.99f && !lvl.checkpoints[1].bidirectional);
}
if (l == 4) {
CHECK(lvl.checkpoints[6].dir.x > 0.99f && !lvl.checkpoints[6].bidirectional);
CHECK(lvl.checkpoints[9].dir.x < -0.99f && !lvl.checkpoints[9].bidirectional);
}
if (l == 6) {
CHECK(lvl.checkpoints[9].dir.x > 0.99f && !lvl.checkpoints[9].bidirectional);
}
if (l == 7) {
CHECK(lvl.checkpoints.size() == 6);
}
if (l == 8) {
CHECK(lvl.checkpoints[1].bidirectional);
CHECK(lvl.checkpoints[4].bidirectional);
}
if (l == 9) {
for (const auto& cp : lvl.checkpoints) {
CHECK(cp.bidirectional);
}
}
// Verify all referenced columns & floor tiles are within valid bounds
int col_cells = 0;