From 0d088abdfa3f0f591a1b13a2748193edeff509ef Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Sat, 6 Sep 2014 04:34:56 +0200 Subject: [PATCH] Server: Minor simplification of mv_yx_in_dir_legal(). --- src/server/map.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/map.c b/src/server/map.c index 807083d..0007633 100644 --- a/src/server/map.c +++ b/src/server/map.c @@ -220,7 +220,7 @@ extern uint8_t mv_yx_in_dir_legal(char dir, struct yx_uint8 * yx) { wrap_north_south++; } - if ( !((wrap_west_east != 0) + (wrap_north_south != 0)) + if ( !wrap_west_east && !wrap_north_south && yx->x < world.map.length && yx->y < world.map.length) { return 1; -- 2.30.2