chiark / gitweb /
Reset midend animation counters on starting a new game.
authorJonas Kölker <jonaskoelker@yahoo.com>
Thu, 8 Oct 2015 08:54:47 +0000 (10:54 +0200)
committerSimon Tatham <anakin@pobox.com>
Wed, 14 Oct 2015 19:29:32 +0000 (20:29 +0100)
This is already done in midend_restart_game via midend_finish_move.
If it's good enough for restarting a game, it ought to also be good
enough for starting new games.

midend.c

index 3165df2e5d6c368d778bd0f55c8190bf6ed46686..c8ab76c43b682bd5638eb389ea50b527d7d65dc8 100644 (file)
--- a/midend.c
+++ b/midend.c
@@ -454,6 +454,7 @@ void midend_new_game(midend *me)
                                               me->states[0].state);
     midend_size_new_drawstate(me);
     me->elapsed = 0.0F;
+    me->anim_pos = me->anim_time = 0.0F;
     if (me->ui)
         me->ourgame->free_ui(me->ui);
     me->ui = me->ourgame->new_ui(me->states[0].state);