diff options
-rw-r--r-- | enemy.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -121,9 +121,9 @@ void update_demon_move(Enemy* e, const World* w) { int dist = fxsqrt(dx * dx2 + dy * dy2) >> fbits; if (e->grounded < 3) { int tx, ty = - ((e->y >> fbits) - (map_tile_size >> 1)) / + ((e->y >> fbits) + (map_tile_size >> 1)) / map_tile_size; - int ty2 = ty + 2; + int ty2 = ty + 1; if (e->face == face_left) { tx = ( (e->x >> fbits) - (map_tile_size >> 1)) / @@ -136,7 +136,7 @@ void update_demon_move(Enemy* e, const World* w) { } if ( tile_at(&w->map, tx, ty) || - (ty2 < map_h && !tile_at(&w->map, tx, ty2)) + (!e->on_ramp && ty2 < map_h && !tile_at(&w->map, tx, ty2)) ) e->face = !e->face; if (e->face == face_left) { |