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

[BUG] Checkpoint doesn't work when using world map #373

Closed
LoveBodhi opened this issue Aug 7, 2022 · 10 comments
Closed

[BUG] Checkpoint doesn't work when using world map #373

LoveBodhi opened this issue Aug 7, 2022 · 10 comments
Assignees
Labels
native bug Something isn't working. Only modern bugs are exist in TheXTech only. Doesn't exist on old VB6 game.
Milestone

Comments

@LoveBodhi
Copy link
Collaborator

LoveBodhi commented Aug 7, 2022

Describe the issue

In the latest development build, checkpoint doesn't work when using world map, but works fine if not use world map.

Example Case

002.zip (Requires Nostalgic Paradise asset!)
TheXTech_log_2022_08_07_14_33_27.txt

Recording

Scr_2022-08-07_14-33-40

Vanilla Recording

None

Additional context

None

@Wohlstand Wohlstand self-assigned this Aug 7, 2022
@Wohlstand Wohlstand added the native bug Something isn't working. Only modern bugs are exist in TheXTech only. Doesn't exist on old VB6 game. label Aug 7, 2022
@Wohlstand
Copy link
Collaborator

Confirmed just now, even on normal assets, this is a bug of engine itself:
Scr_2022-08-07_19-37-07

@Wohlstand Wohlstand added this to the Version 1.3.6 milestone Aug 7, 2022
@Wohlstand
Copy link
Collaborator

I also confirm, they works normally on 1.3.5.3 version.

@0lhi
Copy link
Collaborator

0lhi commented Aug 7, 2022

Could this be related to #371 and #152 ?

@ds-sloth
Copy link
Collaborator

ds-sloth commented Aug 7, 2022

I'd strongly suspect it's related to #371. There was an issue where some of the FileName variables weren't being restored to the world's variables when returning to the world. But, I'd guess that the checkpoints system relied on not restoring those variables. We could either (1) save the most recently visited level separately so that clearing checkpoints works (this makes the game's internals cleaner, but adds ~80 more bytes of RAM -- this is practically nothing on our target platforms), or (2) revert the fix for #371 and make another fix that more narrowly targets the issue, saving this RAM but making the internal code more convoluted.

@Alucard648
Copy link

I prefer 1). 80 bytes of RAM is not that meaningful on modern platforms.

@ds-sloth
Copy link
Collaborator

ds-sloth commented Aug 7, 2022

As I suspected, it's this incorrect line here: https://github.com/Wohlstand/TheXTech/blob/f913d6b0/src/player.cpp#L106-L108

I'm going to fix it by adding a check to not clear checkpoints if LevelSelect is set on line 108.

Sorry for not catching this when fixing #371.

@ds-sloth
Copy link
Collaborator

ds-sloth commented Aug 7, 2022

@LoveBodhi, can you check whether the issue still occurs?

@Wohlstand, does this look like a good solution? Do you remember any other checks that relied on FullFileName being incorrect?

@ds-sloth ds-sloth added the NEED A TEST Completed task that needs a test and confirmation by a reporter label Aug 7, 2022
@LoveBodhi
Copy link
Collaborator Author

Problem fixed❤

@Wohlstand
Copy link
Collaborator

I also confirm the bug has gone! :)

Uploading Scr_2022-08-08_01-50-43.gif…

@Wohlstand Wohlstand removed the NEED A TEST Completed task that needs a test and confirmation by a reporter label Aug 7, 2022
@Wohlstand
Copy link
Collaborator

P.S. Please remove the "NEED A TEST" label from cases that were tested and confirmed as solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
native bug Something isn't working. Only modern bugs are exist in TheXTech only. Doesn't exist on old VB6 game.
Projects
None yet
Development

No branches or pull requests

5 participants