DebugGameState pause is irreversable

Hi,

there seems to be a problem in DebugGameState, once it enters the 'pause' mode, it will prevent itself from un-pausing. Here the update() code section from the DebugGameState class:



    public void update(float tpf) {

        if (pause)

            return;



        // Update the InputHandler

        input.update(tpf);



        // Update the geometric state of the rootNode

        rootNode.updateGeometricState(tpf, true);



        /** If toggle_pause is a valid command (via key p), change pause. /

        if (KeyBindingManager.getKeyBindingManager().isValidCommand(

                "toggle_pause", false)) {

            pause = !pause;

        }

[…]



Notice that once it is in pause mode, it will immediately return and never reach the statement to check for pause button pressed again.

What about a change like this:

    public void update(float tpf) {



        /
* If toggle_pause is a valid command (via key p), change pause. */

        if (KeyBindingManager.getKeyBindingManager().isValidCommand(

                "toggle_pause", false)) {

            pause = !pause;

        }



        if (pause)

            return;



        // Update the InputHandler

        input.update(tpf);



        // Update the geometric state of the rootNode

        rootNode.updateGeometricState(tpf, true);

[…]



Sorry I wasn't sure if i should preferrably file an issue or send a meesage here?



Greetings,

Marcus

We're having a "bug hunting" contest at the moment, found at this link:



http://www.jmonkeyengine.com/jmeforum/index.php?topic=4150.0



At which you'll also find a link to the bug tracker.

Oops…that's my bad. :o

Froggy, AFAIK I already told you about that problem some weeks or months ago. :wink:

What counts is an entry in the bug tracker. :wink:

Gaheris said:

Froggy, AFAIK I already told you about that problem some weeks or months ago. ;)


* COVERS EARS * la la, I can't hear you.  :P

I somewhat recall something of that sort now that you mention it.....I'm going to blame the lack of resolution on not having an entry in the bug tracker though instead of my lack of memory....too many things are already attributed to that flaw....

Hey, I forget stuff all the time too, don’t you worry about it! Check out this post for more information about bugs in DebugGameState.  :-o

Shouldn't we rename the class to "BugGameState"?  }:-@

Well…aren't you funny!



Your on my list now!  :evil:



…don't worry, it's just this pad of paper I write names on…eventually it gets thrown away when I run out of room but it sure sounds scary doesn't it? :wink:

This is fixed and check in now BTW.

Sorry, couldn't resist that joke…



And: It's good that I'm on your list now. It's my permanent fear and nightmare to get garbage collected when nobody references me…

Landei said:

And: It's good that I'm on your list now. It's my permanent fear and nightmare to get garbage collected when nobody references me...


That's actually funny....  :-o

@landei: that was a good one :slight_smile:



@darkfrog: i'm just curious how your list looks like. or maybe your list is just the jme board member list :stuck_out_tongue:

It's probably just a list of people who have helped him fix his buggy code; thats why he's always having to throw it away!  XD

Gentleman Hal said:

It's probably just a list of people who have helped him fix his buggy code; thats why he's always having to throw it away!  XD


That's just mean....  :-o

hehehe

i don't remember ever helping him }:-@ i suppose that reserves me a special place on his list :wink:

Yeah, the part for people he's going to chop up and hide in his wall cavity  :-o