diff --git a/CHANGELOG.md b/CHANGELOG.md index c5fd6bdac..0a203c58a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ - fixed a missing enemy trigger in Tomb of Tihocan (#751) - fixed incorrect trapdoor triggers in City of Khamoon and a switch trigger in Obelisk of Khamoon (#942) - fixed the setup of two music triggers in St. Francis' Folly (#865) +- fixed data portal issues in Atlantean Stronghold that could result in a crash (#227) - improve spanish localization and added translation for rotated pickups ## [2.15.3](https://github.com/rr-/Tomb1Main/compare/2.15.2...2.15.3) - 2023-08-15 diff --git a/README.md b/README.md index ca0e6cbe7..84991fce3 100644 --- a/README.md +++ b/README.md @@ -295,6 +295,7 @@ Not all options are turned on by default. Refer to `Tomb1Main_ConfigTool.exe` fo - **Tomb of Tihocan**: missing trigger in room 62 for enemy 34 - **City of Khamoon**: incorrect trapdoor trigger types in rooms 31 and 34 - **Obelisk of Khamoon**: missing switch trigger type in room 66 + - **Atlantean Stronghold**: fixed poorly configured portals between rooms 74 and 12 #### Cheats - added a fly cheat diff --git a/bin/data/stronghold_fd.bin b/bin/data/stronghold_fd.bin index 662a188b0..6c456e69a 100644 Binary files a/bin/data/stronghold_fd.bin and b/bin/data/stronghold_fd.bin differ diff --git a/src/game/inject.c b/src/game/inject.c index 79bfa2949..6baf1cd7d 100644 --- a/src/game/inject.c +++ b/src/game/inject.c @@ -1602,12 +1602,16 @@ static void Inject_RoomDoorEdits(INJECTION *injection) int16_t base_room; int16_t link_room; + int16_t door_index = -1; int16_t x_change; int16_t y_change; int16_t z_change; for (int i = 0; i < inj_info->room_door_edit_count; i++) { File_Read(&base_room, sizeof(int16_t), 1, fp); File_Read(&link_room, sizeof(int16_t), 1, fp); + if (injection->version >= INJ_VERSION_4) { + File_Read(&door_index, sizeof(int16_t), 1, fp); + } if (base_room < 0 || base_room >= g_RoomCount) { File_Skip(fp, sizeof(int16_t) * 12); @@ -1619,7 +1623,8 @@ static void Inject_RoomDoorEdits(INJECTION *injection) DOOR_INFO *door = NULL; for (int j = 0; j < r->doors->count; j++) { DOOR_INFO d = r->doors->door[j]; - if (d.room_num == link_room) { + if (d.room_num == link_room + && (j == door_index || door_index == -1)) { door = &r->doors->door[j]; break; } @@ -1628,7 +1633,8 @@ static void Inject_RoomDoorEdits(INJECTION *injection) if (!door) { File_Skip(fp, sizeof(int16_t) * 12); LOG_WARNING( - "Room index %d has no door to %d", base_room, link_room); + "Room index %d has no matching door to %d", base_room, + link_room); continue; }