commit 063ae85170d01e0bee54ccdbccbc46307cd00d34
Author: Leszek Koltunski <leszek@koltunski.pl>
Date:   Sun Dec 25 00:36:13 2022 +0100

    Minor.

diff --git a/src/main/java/org/distorted/overlays/OverlayStars.java b/src/main/java/org/distorted/overlays/OverlayStars.java
index ccbbc1f0..269eb8ca 100644
--- a/src/main/java/org/distorted/overlays/OverlayStars.java
+++ b/src/main/java/org/distorted/overlays/OverlayStars.java
@@ -48,7 +48,7 @@ import java.util.Random;
 public class OverlayStars extends OverlayGeneric implements EffectListener
 {
    private static final int DUR_APP =  1500;
-   private static final int DUR_MOV =  3000;
+   private static final int DUR_MOV =  13000;
    private static final int DUR_GLO =   600;
 
    private ListenerOverlay mListener;
@@ -75,14 +75,14 @@ public class OverlayStars extends OverlayGeneric implements EffectListener
       Dynamic3D move = new Dynamic3D();
       move.setMode(Dynamic.MODE_PATH);
       move.setDuration(DUR_MOV);
-      move.setCount(0.40f);
+      move.setCount( mNewStars>0 ? 0.40f : 0.50f );
 
       float widthS = (mRandom.nextFloat()-0.5f)*mWidth*1.10f;
       float widthM = widthS + (mRandom.nextFloat()-0.5f)*mWidth*0.2f;
       float heighS = mRandom.nextFloat()*mHeight*0.2f;
       float heighM = (mRandom.nextFloat()-0.5f)*mHeight*0.2f;
 
-      Static3D pointS = new Static3D(widthS,mHeight*0.55f+heighS,0);
+      Static3D pointS = new Static3D(0,mHeight*0.55f+heighS,0);
       Static3D pointM = new Static3D(widthM,mHeight*0.25f+heighM,0);
       Static3D pointE = new Static3D(0,0,0);
       Static3D pointF = new Static3D(0,0,-10000);
@@ -117,6 +117,12 @@ public class OverlayStars extends OverlayGeneric implements EffectListener
          mAlphaStrength.setCount(0.5f);
          equipAlpha(mAlphaStrength,appear);
          mAlpha = new FragmentEffectAlpha(mAlphaStrength);
+
+         if( mNewStars==0 )
+            {
+            mMoveID = mAlpha.getID();
+            mAlpha.notifyWhenFinished(this);
+            }
          }
       else
          {
@@ -270,7 +276,7 @@ public class OverlayStars extends OverlayGeneric implements EffectListener
       mListener= listener;
       DataStars stars = (DataStars)data;
       mTotalStars = stars.getTotal();
-      mNewStars   = stars.getNew();
+      mNewStars   = -stars.getNew();
       Resources res = stars.getResources();
       mWidth = mScreen.getWidth();
       mHeight= mScreen.getHeight();
@@ -278,9 +284,14 @@ public class OverlayStars extends OverlayGeneric implements EffectListener
       if( !mIncrease ) mNewStars = -mNewStars;
 
       createBitmap(res, mTotalStars);
-      mNodeFalling = createNodeFalling(mIncrease);
-      mNodeFalling.enableDepthStencil(InternalOutputSurface.NO_DEPTH_NO_STENCIL);
-      mScreen.attach(mNodeFalling);
+
+      if( mNewStars!=0 )
+         {
+         mNodeFalling = createNodeFalling(mIncrease);
+         mNodeFalling.enableDepthStencil(InternalOutputSurface.NO_DEPTH_NO_STENCIL);
+         mScreen.attach(mNodeFalling);
+         }
+
       mNodeCentral = createNodeCentral(mTotalStars);
       mNodeCentral.glDepthMask(false);
       mScreen.attach(mNodeCentral);
@@ -355,9 +366,14 @@ public class OverlayStars extends OverlayGeneric implements EffectListener
          mScreen.detach(mNodeCentral);
          mNodeCentral.markForDeletion();
          mNodeCentral=null;
-         mScreen.detach(mNodeFalling);
-         mNodeFalling.markForDeletion();
-         mNodeFalling=null;
+
+         if( mNodeFalling!=null )
+            {
+            mScreen.detach(mNodeFalling);
+            mNodeFalling.markForDeletion();
+            mNodeFalling=null;
+            }
+
          mListener.overlayFinished(id);
          }
       }
