From a7b1697b1cd450589141b88862142dafc72e0b74 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Tue, 17 Aug 2004 19:59:14 +0000 Subject: Now we have the `dir' parameter, we should use it where it makes sense to do so. [originally from svn r4477] --- cube.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'cube.c') diff --git a/cube.c b/cube.c index 45b38bc..d5221e6 100644 --- a/cube.c +++ b/cube.c @@ -1366,13 +1366,15 @@ void game_redraw(frontend *fe, game_drawstate *ds, game_state *oldstate, draw_rect(fe, 0, 0, (int)((bb.r-bb.l+2.0F) * GRID_SCALE), (int)((bb.d-bb.u+2.0F) * GRID_SCALE), COL_BACKGROUND); - if (oldstate && oldstate->movecount > state->movecount) { + if (dir < 0) { game_state *t; /* * This is an Undo. So reverse the order of the states, and * run the roll timer backwards. */ + assert(oldstate); + t = oldstate; oldstate = state; state = t; -- cgit v1.1