From 3ab8efbb9bebea9a9d2f106fcd3439d1a6b66f6f Mon Sep 17 00:00:00 2001 From: jolynsbass Date: Sat, 10 Jun 2006 20:20:51 +0000 Subject: [PATCH] Fixed any possibility of ball size being incorrectly stored from level to level, or from ESC'ing from a level while big or small. git-svn-id: https://s.snth.net/svn/neverball/trunk@444 78b8d119-cf0a-0410-b17c-f493084dd1d7 --- ball/game.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ball/game.c b/ball/game.c index f5f807b..322f69c 100644 --- a/ball/game.c +++ b/ball/game.c @@ -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; } -- 1.7.9.5