Page 1 of 2

[4.0.0] Where's the "Ouch" face?

PostPosted: Sat Apr 13, 2019 9:55 am
by A_D_M_E_R_A_L
The "Ouch" face doesn't work as it should in GZD. Mod used in this screenshot: Pandemonia
https://cdn.discordapp.com/attachments/468487058583715840/566634796009390100/gzdoom_4246.png

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sat Apr 13, 2019 11:40 am
by Enjay
Seems to be. Without mods loaded and simply firing the rocket launcher at the floor in front of me, I was able to reliably get the ouch face in g3.3pre39-g2f45218 (which I happen to have installed for no really good reason) but in 4.0.0 and today's git build, I was not able to get the ouch face despite trying repeatedly. All I ever got was the pain grimace or straight to the dead face.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sun Apr 14, 2019 1:57 am
by Player701
Confirmed. Bisecting indicates it probably started to happen in this commit... yeah, that one again. Some adjacent commits could not be tested because they crash as soon as the game starts, but they don't seem to contain any changes that may have triggerred this bug. On the other hand, the commit I linked to has this.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sun Apr 14, 2019 2:09 am
by Graf Zahl
The ouch face and event handlers do not share any code, though, so it's more likely one of the adjacent commits.
Of course, the event handler code made quite a mess of all code it originally touched, so who knows...

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sun Apr 14, 2019 2:25 am
by Player701
The call to StatusBar->CallTick has been moved to another place within the P_Ticker function since that commit (see second link), and that could be the cause of the bug. I haven't looked deeper into the whole call chain there, though. What I can say for sure is that the value of the mugshot's FaceHealth field and the player's health appear to be always synchronized but the ouch face code expects them to be different at times.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sun Apr 14, 2019 2:28 am
by _mental_
Indeed, the problem is the value of ouch is always false. This is the consequence of the mentioned change, i.e. the move of StatusBar->CallTick() line.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sun Apr 14, 2019 5:21 pm
by Graf Zahl
That piece of code is a textbook example of depending on side effects from other places. The main problem being that the old order of things was wrong - the status bar never got the full state of the frame to be displayed. Unfortunately the mug shot code is an area where my knowledge is limited because I only use the alternative HUD myself which doesn't have it.

So what piece of code needs to be moved where? I'm not really sure.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Fri Apr 19, 2019 12:34 am
by Graf Zahl
I changed the setup but I'm afraid this has to be tested by someone else, I'm not sure it's 100% correct.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Fri Apr 19, 2019 1:43 am
by Player701
I'm not seeing any new commits, and for me the bug is still present...

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Fri Apr 19, 2019 1:54 am
by Graf Zahl
Damn, the change got lost in a branch switch, it seems.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sun Apr 28, 2019 2:22 am
by Player701
Just wanted to confirm that this bug is still present as of GZDoom 4.1.0.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Fri May 10, 2019 8:13 pm
by A_D_M_E_R_A_L
Still present in 4.1.1

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sat May 11, 2019 3:22 am
by Graf Zahl
Obviously, condidering nothing has been done about it yet.

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sat Jun 08, 2019 4:42 am
by Player701
I'm terribly sorry for the bump, but is there any chance this could be fixed in the next release? I really miss the good old ouch face... :(

Re: [4.0.0] Where's the "Ouch" face?

PostPosted: Sat Jun 08, 2019 4:56 am
by Rachael
If you have any ideas how to fix it and you think you can submit a PR within the next few hours, sure. It can be included.