Simethereal DebugHudState

Not sure if this is desired behavior so figure should ask about it.

I know I could just remove debugHudState for production but just wondering if this is something I did to cause the “feature” I describe below to appear.

When first starting Simethereal client, DebugHudState is initialized. When we login, PlayerMovementState shows the position and speed in the DebugHUD.

When we disconnect, not exit, we get dumped back to the MainMenuState and here I am seeing these two nodes (Position:, Speed:) still at the top of the screen where you enter the host and port.

Upon logging back in, they duplicate.

I fixed this by just checking for the DebugHudState in cleanup of PlayerMovementState and just removing the values for position and speed

        if( getState(DebugHudState.class) != null ) {
            DebugHudState debug = getState(DebugHudState.class);

after removeStateListener.

Just wondering if this “feature” was intended or something I caused so I am defensive coding.

I forgot I have sim-eth-es setup for study so I checked it out and it does same thing so I am thinking this is an oversight so if confirmed, i will submit Pr’s tommorrow.

Yep, just an oversight.