Mark levels completed when using set cheat
[neverball] / putt / st_all.c
index 12ab0ba..a4c366e 100644 (file)
@@ -239,7 +239,7 @@ static void title_paint(int id, float t)
 
 static void title_timer(int id, float dt)
 {
-    float g[3] = { 0.0f, -9.8f, 0.0f };
+    float g[3] = { 0.f, 0.f, 0.f };
 
     game_step(g, dt);
     game_set_fly(fcosf(time_state() / 10.f));
@@ -550,7 +550,7 @@ int goto_pause(struct state *s, int e)
     if (curr_state() == &st_pause)
         return 1;
 
-    if (e && (SDL_GetModState() & KMOD_SHIFT))
+    if (e && !config_tst_d(CONFIG_KEY_PAUSE, SDLK_ESCAPE))
         return goto_state(s);
 
     st_continue = curr_state();
@@ -654,8 +654,6 @@ static int shared_keybd(int c, int d)
 {
     if (d)
     {
-        if (c == SDLK_ESCAPE)
-            return goto_pause(&st_over, 1);
         if (config_tst_d(CONFIG_KEY_PAUSE, c))
             return goto_pause(&st_over, 0);
     }
@@ -708,10 +706,6 @@ static int next_enter(void)
     if (paused)
         paused = 0;
 
-    if (!config_get_d(CONFIG_BALL_COLLISIONS))
-        game_set_play(-2, 0);
-    game_set_play(0, 1);
-
     return id;
 }
 
@@ -895,7 +889,7 @@ static void stroke_paint(int id, float t)
 
 static void stroke_timer(int id, float dt)
 {
-    float g[3] = { 0.0f, -9.8f, 0.0f };
+    float g[3] = { 0.f, 0.f, 0.f };
 
     float k;
 
@@ -1006,7 +1000,7 @@ static int goal_enter(void)
     if (paused)
         paused = 0;
     else
-        hole_goal(0);
+        hole_goal();
 
     hud_init();
 
@@ -1093,7 +1087,7 @@ static void stop_paint(int id, float t)
 
 static void stop_timer(int id, float dt)
 {
-    float g[3] = { 0.0f, -9.8f, 0.0f };
+    float g[3] = { 0.f, 0.f, 0.f };
 
     game_update_view(dt);
     game_step(g, dt);