Fixed any possibility of ball size being incorrectly stored from level to level,...
authorjolynsbass <jolynsbass@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sat, 10 Jun 2006 20:20:51 +0000 (20:20 +0000)
committerjolynsbass <jolynsbass@78b8d119-cf0a-0410-b17c-f493084dd1d7>
Sat, 10 Jun 2006 20:20:51 +0000 (20:20 +0000)
git-svn-id: https://s.snth.net/svn/neverball/trunk@444 78b8d119-cf0a-0410-b17c-f493084dd1d7

ball/game.c

index f5f807b..322f69c 100644 (file)
@@ -76,14 +76,13 @@ static float grow_t = 0.0;              /* timer for the ball to grow...     */
 static float grow_strt = 0;             /* starting value for growth         */
 const  float grow_big  = 1.5f;          /* large factor                      */
 const  float grow_small= 0.5f;          /* small factor                      */
-
+static int   got_orig = 0;              /* Do we know original ball size?    */
 
 
 /*---------------------------------------------------------------------------*/
 
 static void grow_set(const struct s_file *fp, int size)
-{
-    static int got_orig = 0;
+{    
     if (!got_orig)
     {
         grow_orig = fp->uv->r;
@@ -225,6 +224,10 @@ int game_init(const struct level *level, int t, int g)
     sol_load_gl(&back, config_data(level->back),
                 config_get_d(CONFIG_TEXTURES), 0);
 
+    /* Initialize ball size tracking... */
+
+    got_orig = 0;
+
     return game_state;
 }