From 7a2a4e59c299473d60bceb4d51be470feff866e8 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Thu, 19 Aug 2021 17:42:27 -0400 Subject: Revert "char/enemy: Try to fix movement lag" This reverts commit 09775804429ccd7486419b4c539581d6f70e193d. --- (limited to 'src/char/enemy.c') diff --git a/src/char/enemy.c b/src/char/enemy.c index 3f9f994..eeda38d 100644 --- a/src/char/enemy.c +++ b/src/char/enemy.c @@ -133,12 +133,12 @@ _mf_enemy_turn(struct mf_char *c) if (e->allies[i]->cur_x == c->cur_x + dx && e->allies[i]->cur_y == c->cur_y + dy) { /* Another enemy currently in this direction */ - return _mf_enemy_step(c); + return 0; } if (e->allies[i]->new_x == c->cur_x + dx && e->allies[i]->new_y == c->cur_y + dy) { /* Another enemy moving in this direction */ - return _mf_enemy_step(c); + return 0; } } @@ -240,13 +240,3 @@ mf_enemy_random_jump(struct mf_char *c, int maze_size) c->cur_x = rand() / (RAND_MAX / maze_size); c->cur_y = rand() / (RAND_MAX / maze_size); } - -int -mf_enemy_postupdate(struct mf_char *c) -{ - if (c->travel == 0 && c->turning == 0) { - return _mf_enemy_turn(c); - } else { - return 0; - } -} -- cgit v0.9.1