Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tr2/objects/detonator: check for chosen inventory object #1965

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/tr2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
- fixed broken final stats screen in software rendering mode (#1915, regression from 0.6)
- fixed screenshots not capturing level stats (#1925, regression from 0.6)
- fixed screenshots sometimes crashing in the windowed mode (regression from 0.6)
- fixed the detonator key and gong hammer not activating their target items when manually selected from the inventory (#1887)

## [0.6](https://github.com/LostArtefacts/TRX/compare/tr2-0.5...tr2-0.6) - 2024-11-06
- added a fly cheat key (#1642)
Expand Down
1 change: 1 addition & 0 deletions docs/tr2/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ decompilation process. We recognize that there is much work to be done.
- fixed the distorted skybox in room 5 of Barkhang Monastery
- fixed new saves not displaying the save count in the passport
- fixed Lara getting stuck in her hit animation if she is hit while mounting the boat or skidoo
- fixed the detonator key and gong hammer not activating their target items when manually selected from the inventory
- fixed the following floor data issues:
- **Opera House**: fixed the trigger under item 203 to trigger it rather than item 204
- **Tibetan Foothills**: added missing triggers for the drawbridge in room 96 (after the flipmap)
Expand Down
3 changes: 2 additions & 1 deletion src/tr2/game/objects/general/detonator.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ void __cdecl Detonator_Collision(
item->rot.y = lara_item->rot.y;
item->rot.z = 0;

if (item->status == IS_DEACTIVATED || !g_Input.action
if (item->status == IS_DEACTIVATED
|| (g_Inv_Chosen == NO_OBJECT && !g_Input.action)
|| g_Lara.gun_status != LGS_ARMLESS || lara_item->gravity
|| lara_item->current_anim_state != LS_STOP) {
goto normal_collision;
Expand Down