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

items: avoid changing const hitpoints #893

Merged
merged 1 commit into from
Jul 17, 2023

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Jul 17, 2023

Resolves #892.
Regression from #888.

Checklist

  • I have read the coding conventions
  • I have added a changelog entry about what my pull request accomplishes, or it is an internal change

Description

The previous clamping method was setting hitpoints to -16383, so the condition below was passing and hence Natla's control was treating her as already dead instead of initiating the semi-death countdown timer.

https://github.com/LostArtefacts/Tomb1Main/blob/develop/src/game/objects/creatures/natla.c#L86

To avoid further issues, if an item's hitpoints value is DONT_TARGET no further changes will be made to it. For normal cases, we clamp to 0. I've tested each enemy's death, Lara's own death, shooting the scion and the mummy in Qualopec.

@lahm86 lahm86 added the TRX bug A bug with TRX label Jul 17, 2023
@lahm86 lahm86 added this to the 2.15.2 milestone Jul 17, 2023
@lahm86 lahm86 requested review from rr- and walkawayy July 17, 2023 09:43
@rr- rr- merged commit c844caf into LostArtefacts:develop Jul 17, 2023
1 check passed
@lahm86 lahm86 deleted the issue-892-natla-death branch August 16, 2023 18:43
@rr- rr- added the TR1 label Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TR1 TRX bug A bug with TRX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Natla not waking up
2 participants