tr2/data: fix invalid portals in The Deck

This disables the visibility portal from room 17 to room 104 (and vice
versa) in The Deck to avoid Lara seeing or targeting enemies in the
disconnected rooms.

Resolves #2393.
This commit is contained in:
lahm86 2025-04-15 19:40:54 +01:00
parent 45b64cbb97
commit 10f1bc6fbd
5 changed files with 17 additions and 1 deletions

View file

@ -234,6 +234,7 @@
{"type": "level_complete"},
],
"injections": [
"data/injections/deck_fd.bin",
"data/injections/deck_itemrots.bin",
"data/injections/deck_pickup_meshes.bin",
"data/injections/living_deck_goon_sfx.bin",

Binary file not shown.

View file

@ -34,6 +34,7 @@
- fixed a softlock in Temple of Xian if the main chamber key is missed (#2042)
- fixed a potential softlock in Floating Islands if returning towards the level start from the gold secret (#2590)
- fixed a potential softlock in Nightmare in Vegas where the bird monster could remain inactive, or the flip map not set (#1851)
- fixed invalid portals in The Deck between rooms 17 and 104, which could result in Lara seeing enemies in disconnected rooms (#2393)
- fixed the camera going out of bounds in 60fps near specific invalid floor data (known as no-space) (#2764, regression from 0.10)
- fixed sprites rendering black if no shade value is assigned in the level (#2701, regression from 0.8)
- fixed a crash if an image was missing

View file

@ -211,6 +211,7 @@ as Notepad.
- fixed the following floor data issues:
- **Opera House**: fixed the trigger under item 203 to trigger it rather than item 204
- **Wreck of the Maria Doria**: fixed room 98 not having water
- **The Deck**: fixed invalid portals between rooms 17 and 104, which could result in Lara seeing enemies in disconnected rooms
- **Tibetan Foothills**: added missing triggers for the drawbridge in room 96 (after the flipmap)
- **Catacombs of the Talion**: changed some music triggers to pads near the first yeti, and added missing triggers and ladder in room 116 (after the flipmap)
- **Ice Palace**: fixed door 143's position to resolve the invisible wall in front of it, and added an extra pickup trigger beside the Gong Hammer in room 29

View file

@ -299,7 +299,7 @@ static void M_RoomPortalEdits(
const ROOM *const room = Room_Get(base_room);
PORTAL *portal = nullptr;
for (int32_t j = 0; j < room->portals->count; j++) {
PORTAL room_portal = room->portals->portal[j];
const PORTAL room_portal = room->portals->portal[j];
if (room_portal.room_num == link_room && j == portal_index) {
portal = &room->portals->portal[j];
break;
@ -314,10 +314,23 @@ static void M_RoomPortalEdits(
continue;
}
bool empty_portal = true;
for (int32_t j = 0; j < 4; j++) {
portal->vertex[j].x += VFile_ReadS16(injection->fp);
portal->vertex[j].y += VFile_ReadS16(injection->fp);
portal->vertex[j].z += VFile_ReadS16(injection->fp);
empty_portal &= portal->vertex[j].x == 0 && portal->vertex[j].y == 0
&& portal->vertex[j].z == 0;
}
// An injection that has reset all vertices such that the portal size is
// now 0, should be interpreted as a command to ignore that portal.
if (empty_portal) {
for (int32_t j = portal_index + 1; j < room->portals->count; j++) {
room->portals->portal[j - 1] = room->portals->portal[j];
}
room->portals->portal[room->portals->count - 1] = *portal;
room->portals->count--;
}
}
}