Skip to content

Commit

Permalink
Fix secret triggers on triangles (LostArtefacts#728)
Browse files Browse the repository at this point in the history
  • Loading branch information
lahm86 authored Jul 14, 2024
1 parent ec4250b commit f0d806f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
## [Unreleased](https://github.com/LostArtefacts/TR-Rando/compare/V1.9.1...master) - xxxx-xx-xx
- fixed docile bird monsters causing multiple Laras to spawn in remastered levels (#723)
- fixed the incomplete skidoo model in TR2R when it appears anywhere other than Tibetan Foothills (#721)
- fixed secrets on triangle portals not triggering in TR3 (#727)
- improved data integrity checks when opening a folder and prior to randomization (#719)

## [V1.9.1](https://github.com/LostArtefacts/TR-Rando/compare/V1.9.0...V1.9.1) - 2024-06-23
Expand Down
5 changes: 5 additions & 0 deletions TRRandomizerCore/Randomizers/Shared/SecretArtefactPlacer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,11 @@ private void CreateSecretTriggers(TRSecretPlacement<T> secret, short room, TRRoo
while (mainSector.RoomBelow != TRConsts.NoRoom)
{
// Ensure we go as far down as possible - for example, Atlantis room 47 sector 10,9 - but stay in the same room
// Don't traverse down if it's a TR3 triangle portal. This assumes the secret would never be mid-air over the portal.
if (mainSector.FDIndex != 0 && _floorData[mainSector.FDIndex].Any(e => e is FDTriangulationEntry t && t.IsFloorPortal))
{
break;
}
location.Y = (mainSector.Floor + 1) * TRConsts.Step1;
location.Room = mainSector.RoomBelow;
mainSector = _sectorGetter(location);
Expand Down
6 changes: 3 additions & 3 deletions TRRandomizerCore/Resources/TR3/Locations/locations.json
Original file line number Diff line number Diff line change
Expand Up @@ -2541,9 +2541,9 @@
"Room": 90
},
{
"X": 52486,
"Y": -5120,
"Z": 51462,
"X": 52895,
"Y": -4711,
"Z": 51965,
"Room": 73,
"Difficulty": "Hard"
},
Expand Down

0 comments on commit f0d806f

Please sign in to comment.