Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Bugs : Regression: Cannot leave cutscene containing checkpoint after changing focus ([Game logic])
New Topic New Poll Post Reply
Poster Message
greenscience
Level: Master Delver
Rank Points: 102
Registered: 02-27-2015
IP: Logged
icon Regression: Cannot leave cutscene containing checkpoint after changing focus (+2)  
This regression was introduced between the 10/30 alpha and 11/10a alpha. After triggering a checkpoint with cutscene in the same script like the first checkpoint in RPG Mini, minimize and restore the game window then close checkpoint. This puts the game in a state where player cannot move. Pressing undo afterwards allows moving with keyboard but not mouse, then trying to fight monsters prevents movement again.

A minimal script to reproduce the issue is:
Wait for player to touch me
Cut scene 1
Score Checkpoint

11-16-2020 at 05:26 AM
View Profile Send Private Message to User Send Email to User Show all user's posts Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2273
Registered: 07-11-2014
IP: Logged
icon Re: Regression: Cannot leave cutscene containing checkpoint after changing focus (+1)  
Wow this is an odd bug.

The issue seems to be that when you lose focus and restore while the score checkpoint window is up, something prevents the cutscene from progressing properly. Undoing leaves you inside the cutscene even if you undo to a time when the cutscene shouldn't have started yet, and movement stops responding when the game tries to open the score checkpoint window again.

Swapping focus and back again once the score checkpoint window is closed restores normal functionality.

EDIT: This is happening with Yes/No question dialogs inside cutscenes too.

[Last edited by kieranmillar at 11-16-2020 09:21 PM]
11-16-2020 at 09:03 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 4727
Registered: 02-04-2003
IP: Logged
icon Re: Regression: Cannot leave cutscene containing checkpoint after changing focus (0)  
kieranmillar wrote:
Wow this is an odd bug.

The issue seems to be that when you lose focus and restore while the score checkpoint window is up, something prevents the cutscene from progressing properly.
...
Swapping focus and back again once the score checkpoint window is closed restores normal functionality.

EDIT: This is happening with Yes/No question dialogs inside cutscenes too.
Yep, this is all correct. Good sleuthing!

I think I've isolated the root cause: it's a regression in this
PR
. The new logic in CGameScreen::OnWindowEvent_GetFocus() sets dwTimeMinimized, which causes progression of the cut scene to hang.

The logic in CGameScreen::OnWindowEvent_GetFocus() and CGameScreen::OnWindowEvent_LoseFocus() appears to be backwards from the logic in CGameScreen::OnWindowEvent() just above them. (For instance, why pause sounds when we're getting focus back? I'm not sure how this worked before, and I think this same issue happens in 5.1.1 with a question dialog during a cutscene.)

Skell, can you confirm the logic in these events is backwards? I'm putting up a PR to flip them. That resolves this issue, but please let me know if I'm missing something.

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.

[Last edited by mrimer at 11-17-2020 11:02 PM]
11-17-2020 at 11:01 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
mrimer
Level: Legendary Smitemaster
Avatar
Rank Points: 4727
Registered: 02-04-2003
IP: Logged
icon Re: Regression: Cannot leave cutscene containing checkpoint after changing focus (0)  
PR

____________________________
Gandalf? Yes... That's what they used to call me.
Gandalf the Grey. That was my name.
I am Gandalf the White.
And I come back to you now at the turn of the tide.
11-17-2020 at 11:11 PM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 2273
Registered: 07-11-2014
IP: Logged
icon Re: Regression: Cannot leave cutscene containing checkpoint after changing focus (+1)  
Can confirm fixed in 1.2.8.339
11-18-2020 at 06:52 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Bugs : Regression: Cannot leave cutscene containing checkpoint after changing focus ([Game logic])
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.8
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.