--- deliantra/server/common/map.c 2006/02/08 03:46:15 1.2 +++ deliantra/server/common/map.c 2006/02/21 11:00:07 1.3 @@ -1920,12 +1920,6 @@ */ if (!m) return 0; - /* Simple case - coordinates are within this local - * map. - */ - if ( x>=0 && x=0 && y < MAP_HEIGHT(m)) - return 0; - if (x<0) { if (!m->tile_path[3]) return 1; if (!m->tile_map[3] || m->tile_map[3]->in_memory != MAP_IN_MEMORY) { @@ -1954,7 +1948,11 @@ } return (out_of_map(m->tile_map[2], x, y - MAP_HEIGHT(m))); } - return 1; + + /* Simple case - coordinates are within this local + * map. + */ + return 0; } /* This is basically the same as out_of_map above, but @@ -1968,13 +1966,6 @@ mapstruct *get_map_from_coord(mapstruct *m, sint16 *x, sint16 *y) { - /* Simple case - coordinates are within this local - * map. - */ - - if (*x>=0 && *x=0 && *y < MAP_HEIGHT(m)) - return m; - if (*x<0) { if (!m->tile_path[3]) return NULL; if (!m->tile_map[3] || m->tile_map[3]->in_memory != MAP_IN_MEMORY) @@ -2007,7 +1998,12 @@ *y -= MAP_HEIGHT(m); return (get_map_from_coord(m->tile_map[2], x, y)); } - return NULL; /* Shouldn't get here */ + + /* Simple case - coordinates are within this local + * map. + */ + + return m; } // return wether map2 is adjacent to map1 and store their distance