Small patch for TransitionGameState [Committed]

Home Forum Archive Contribution Depot (jME2) Small patch for TransitionGameState [Committed]

This topic contains 1 reply, has 1 voice, and was last updated by  Mindgamer 6 years ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11349

    Mindgamer
    1p
    Member

    I have posted this in troubleshooting section a couple of weeks ago, but since it was overlooked, I think I will try to get it applied myself…

    Currently when one uses the TransitionGameState to fade from one gamestate to the next there is a small flicker in the very beginning of the transition. This is so due to the alpha state being still at 1.0f. Anyways here are patches for both version 1.0 and 2.0 that correct this alphastate problem and removes the flicker. If need be, I can provide testcases also.

    jME 2.0


    Index: C:/My Workspace/jME v2/src/com/jmex/game/state/load/TransitionGameState.java
    ===================================================================
    --- C:/My Workspace/jME v2/src/com/jmex/game/state/load/TransitionGameState.java   (revision 4006)
    +++ C:/My Workspace/jME v2/src/com/jmex/game/state/load/TransitionGameState.java   (working copy)
    @@ -127,6 +127,7 @@
           super(lifeInSeconds);
           this.leadIn = leadIn;
           this.transition = transition;
    +      this.transition.setAlpha(0.0f);
        }
     
        public void updatePercentage(float percentComplete) {

    jME 1.0


    ### Eclipse Workspace Patch 1.0
    #P jME v1
    Index: src/com/jmex/game/state/load/TransitionGameState.java
    ===================================================================
    RCS file: /cvs/jme/src/com/jmex/game/state/load/TransitionGameState.java,v
    retrieving revision 1.1
    diff -u -r1.1 TransitionGameState.java
    --- src/com/jmex/game/state/load/TransitionGameState.java   20 Oct 2006 00:39:02 -0000   1.1
    +++ src/com/jmex/game/state/load/TransitionGameState.java   14 Aug 2008 12:41:37 -0000
    @@ -127,6 +127,7 @@
           super(lifeInSeconds);
           this.leadIn = leadIn;
           this.transition = transition;
    +      this.transition.setAlpha(0.0f);
        }
     
        public void updatePercentage(float percentComplete) {

    #85500

    Mindgamer
    1p
    Member

    OK, will commit

Viewing 2 posts - 1 through 2 (of 2 total)

The forum ‘Contribution Depot (jME2)’ is closed to new topics and replies.