Page 1 of 1

Time freezing and console issue

PostPosted: Wed May 17, 2017 7:15 pm
by Blue Shadow
Tested with: 3.0pre-200-gebf3a37 64-bit

In the attached file, there is a custom PowerTimeFreezer power-up which does not pause sound while in effect. The problem is, if you toggle the console on and then off to go back to the game after you got the power-up, sounds pause or cannot be heard.

To produce: summon TimeFreezeSphere item from the console and pick it up. Fire you weapon. You'll hear the sound playing. Now toggle the console on and then off. Fire your weapon again. This time you won't hear any sound.

Re: Time freezing and console issue

PostPosted: Thu May 18, 2017 12:47 pm
by Enjay
Blue Shadow wrote:Now toggle the console on and then off. Fire your weapon again. This time you won't hear any sound.

FWIW, opening the menu (by pressing Esc) and closing it again has the same effect.

Re: Time freezing and console issue

PostPosted: Fri May 19, 2017 4:32 am
by Graf Zahl
What makes you even think it is a BUG if you override some system-defined behavior without checking if other parts of the engine depend on it?

(Actually, the real bug here is that the engine blissfully assumes that there's no need to maintain multiple conditions for sound pausing - opening the menu should set a different pause state that's independent of the powerup - but it was all just hacked in...)

Re: Time freezing and console issue

PostPosted: Fri May 19, 2017 4:57 am
by Graf Zahl
Putting on hold because the underlying logic is too messed up. I first need an idea how to deal with this so that it won't break down completely.
The main issue is that S_PauseSound/S_ResumeSound are absolute. Ideally they should be paired so that multiple pauses require multiple resumes, but as you can imagine the way they are used very effectively prevents that, also clearly indicated by different parameters for both.