-
Notifications
You must be signed in to change notification settings - Fork 38
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
gun: fix Lara holster and back states #1442
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am 99% likely to have missed some fringe test cases, but everything LGTM... I tried restarting, level selecting, picking up different combinations of guns, checking the guns on save / load between entire game shutdowns, and more. aredfan will probably serve as the ultimate raid boss on this test though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great.
There is one slight anomaly, but I can't decide if it's an actual issue or not.
- Load Natla's Mines
give uzis
- The uzi holster meshes are drawn
- Level skip
- In Atlantis, the uzi holster meshes are drawn
- Equip guns, and Lara draws her pistols
But this sort of makes sense I think, because even if you try to draw guns in Mines with only the uzis, she doesn't because those aren't the actual selected guns. But on the other hand, you see her holstered uzis and so can be forgiven for expecting those to be drawn.
It raises the question of when you pick up another weapon and you don't have pistols, should that become the current selected weapon?
Thank you for testing!
IMO yes, but I believe it's a different issue since it involves equipping the guns rather than the meshes covered in this PR. Let's open a new ticket for that. |
I think I've fully tested the Natla Mines => Atlantis scenarios. If
Proceed to the next level (Atlantis) and Lara is holding pistols in her hands instead of a shotgun. Also there is no shotgun on her back. I'll test all the remaining stuff on the list this afternoon. |
There's just 1 issue regarding legacy saves with Save: Edit: Actually this is a TR1X bug and not an issue with legacy saves. I was able to reproduce it in 4.2. |
Testing done! LGTM and thank you for taking the time to work on this issue. To summarise: |
https://home.wind.garden/serve/pub/TR1X-4.2-48-g65bed6e-Windows.zip I'll now look into the NG+ issue which I missed before. |
https://home.wind.garden/serve/pub/TR1X-4.2-49-gc3740a4-Windows.zip |
@rr- For the first 2 issues:
For NG(+) If If
|
c3740a4
to
78bbd8e
Compare
That's good as Lara forcefully gets her pistols back, and the revert to pistols option correctly switches her equipped gun to pistols. @aredfan can you plesae give this one more round of tests? It should fix the savegame issue and the meshes in NG/NG+. The fix was had a significant change, but it affected only when the https://home.wind.garden/serve/pub/TR1X-4.2-49-g78bbd8e-Windows.zip |
@rr- No problem, I'm happy to keep testing if needs be. The shotgun save issue is now fixed. 👍 These 2 remaining issues still persist when
|
I would say this is the intended behavior, since she does revert to pistols, but at the same time it's shown that she has the uzis. Or maybe I should make this setting not apply to the first level? |
I would say if |
That does make sense actually since the setting says |
I've set it to keep the UZIs regardless of the |
Merged in a1e72ac |
Checklist
Description
Resolves #1437.
It's impossible to determine which guns should go in Lara's holsters and on her back without saving this information in the save files. To address this, I've added this data to
RESUME_INFO
, which should work well with the Select Level and Restart Level features. For smoother state management, the current holsters and back gun types are now also included inLARA_INFO
(although, in theory, this could be inferred from mesh comparisons). This addition requires extra record-keeping. Additionally, to accommodate saves lacking the new holsters and back gun types information (such as TombATI and anything pre-4.3), I've introduced a specialLARA_GUN_TYPE
member:LGT_UNKNOWN
. Although not ideal, it's the only method I could devise to support these configurations. When this information is missing,Savegame_ApplyLogicToCurrentInfo
makes educated guesses to fill in the gaps.Because I hated seeing
mesh_ptrs
so often during this endeavor I've introducedLara_SwapSingleMesh
which compelsLara_SwapMeshExtra
.Important testing scenarios to consider that ideally should be combined with each other:
revert_to_pistols
config optionReference mesh matrix for gun combinations that make sense: