Merged branch utf8.
[neverball] / ball / st_over.c
index f544544..1d486f3 100644 (file)
@@ -1,4 +1,4 @@
-/*   
+/*
  * Copyright (C) 2003 Robert Kooima
  *
  * NEVERBALL is  free software; you can redistribute  it and/or modify
@@ -15,7 +15,7 @@
 #include "gui.h"
 #include "set.h"
 #include "game.h"
-#include "level.h"
+#include "levels.h"
 #include "audio.h"
 #include "config.h"
 #include "demo.h"
@@ -30,6 +30,9 @@ static int over_enter(void)
 {
     int id;
 
+    if (curr_lg()->mode != MODE_CHALLENGE)
+        return 0;
+
     if ((id = gui_label(0, _("GAME OVER"), GUI_LRG, GUI_ALL, gui_gry, gui_red)))
     {
         gui_layout(id, 0, 0);
@@ -46,7 +49,7 @@ static int over_enter(void)
 
 static void over_timer(int id, float dt)
 {
-    if (dt > 0.f && time_state() > 3.f)
+    if (curr_lg()->mode != MODE_CHALLENGE || time_state() > 3.f)
         goto_state(&st_start);
 
     gui_timer(id, dt);