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

tr1/objects/scion3: save scion hitpoints #1820

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

lahm86
Copy link
Collaborator

@lahm86 lahm86 commented Nov 3, 2024

Resolves #1819.

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

This ensures the shootable scion's hitpoints value is saved so if it's still active on reload, Lara can't continue to target it.
Existing saves would continue to have this bug, so it's a going-forward fix.

@lahm86 lahm86 added OG bug A bug in original game TR1 labels Nov 3, 2024
@lahm86 lahm86 self-assigned this Nov 3, 2024
@lahm86 lahm86 requested review from a team as code owners November 3, 2024 15:43
@lahm86 lahm86 requested review from rr-, walkawayy and aredfan and removed request for a team November 3, 2024 15:43
Copy link

github-actions bot commented Nov 3, 2024

Copy link
Collaborator

@aredfan aredfan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bugfix is working perfectly, thank you. 👍

@@ -12,6 +12,7 @@ void Scion3_Setup(OBJECT *obj)
obj->control = Scion3_Control;
obj->hit_points = 5;
obj->save_flags = 1;
obj->save_hitpoints = 1;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh no – we can't do it like this, or else it'll break legacy saves. We need to force disable saving the hitpoints in the legacy reader.

Should be easy to test – just grab a TombATI save from that level, try to load it with TRX containing the fix from this PR, and it shouldn't crash.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!
Pushed a fix, and test saves attached. This loads OK (and can confirm it certainly did crash before fixing this).

saveati.zip

@lahm86 lahm86 force-pushed the issue-1819-save-scion-hp branch from 874ef8c to 5f230c1 Compare November 3, 2024 19:11
@lahm86 lahm86 requested review from rr- and aredfan November 3, 2024 19:12
This ensures the shootable scion's hitpoints value is saved so if it's
still active on reload, Lara can't continue to target it.

Resolves LostArtefacts#1819.
@lahm86 lahm86 force-pushed the issue-1819-save-scion-hp branch from 5f230c1 to d72d14d Compare November 3, 2024 19:13
@lahm86 lahm86 merged commit efc150d into LostArtefacts:develop Nov 3, 2024
6 checks passed
@lahm86 lahm86 deleted the issue-1819-save-scion-hp branch November 3, 2024 21:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OG bug A bug in original game TR1
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

OG bug: possible to increment kills when destroying the scion
3 participants