Net's redraw function now uses the `dir' argument to determine whether it's
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Mon, 16 Aug 2004 16:51:18 +0000 (16:51 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Mon, 16 Aug 2004 16:51:18 +0000 (16:51 +0000)
redrawing an undo. Seems to work.

git-svn-id: svn://svn.tartarus.org/sgt/puzzles@4470 cda61777-01e9-0310-a592-d414129be87e

net.c

diff --git a/net.c b/net.c
index 4e752ed..bb9218f 100644 (file)
--- a/net.c
+++ b/net.c
@@ -1323,11 +1323,9 @@ void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate,
         break_label:
 
         if (tx >= 0) {
-            if (tile(state, tx, ty) == ROT(tile(oldstate, tx, ty),
-                                           state->last_rotate_dir))
-                angle = state->last_rotate_dir * 90.0F * (t / ROTATE_TIME);
-            else
-                angle = state->last_rotate_dir * -90.0F * (t / ROTATE_TIME);
+            int last_rotate_dir = dir==-1 ? oldstate->last_rotate_dir :
+                                            state->last_rotate_dir;
+            angle = last_rotate_dir * dir * 90.0F * (t / ROTATE_TIME);
             state = oldstate;
         }
     }