--- deliantra/server/random_maps/exit.C 2012/01/03 11:25:33 1.53 +++ deliantra/server/random_maps/exit.C 2017/09/16 22:17:42 1.56 @@ -1,24 +1,24 @@ /* * This file is part of Deliantra, the Roguelike Realtime MMORPG. - * - * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012 Marc Alexander Lehmann / Robin Redeker / the Deliantra team + * + * Copyright (©) 2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016 Marc Alexander Lehmann / Robin Redeker / the Deliantra team * Copyright (©) 2001 Mark Wedel & Crossfire Development Team * Copyright (©) 1992 Frank Tore Johansen - * + * * Deliantra is free software: you can redistribute it and/or modify it under * the terms of the Affero GNU General Public License as published by the * Free Software Foundation, either version 3 of the License, or (at your * option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the Affero GNU General Public License * and the GNU General Public License along with this program. If not, see * . - * + * * The authors can be reached via e-mail to */ @@ -225,11 +225,11 @@ /* surround the exits with notices that this is a random map. */ for (int j = 1; j < 9; j++) - if (!wall_blocked (map, the_exit_up->x + freearr_x[j], the_exit_up->y + freearr_y[j])) + if (!wall_blocked (map, the_exit_up->x + DIRX (j), the_exit_up->y + DIRY (j))) { object *random_sign = archetype::get (shstr_sign); random_sign->msg = format ("This is a random map.\nLevel: %d of %d.\n", RP->dungeon_level - 1, RP->dungeon_depth); - map->insert (random_sign, the_exit_up->x + freearr_x[j], the_exit_up->y + freearr_y[j], 0, 0); + map->insert (random_sign, the_exit_up->x + DIRX (j), the_exit_up->y + DIRY (j), 0, 0); } /* Block the exit so things don't get dumped on top of it. */ @@ -281,8 +281,8 @@ { int i = rmg_find_free_spot (the_exit_down, map, downx, downy, 1, SIZEOFFREE1 + 1); - the_exit_down->x = downx + freearr_x[i]; - the_exit_down->y = downy + freearr_y[i]; + the_exit_down->x = downx + DIRX (i); + the_exit_down->y = downy + DIRY (i); RP->set ("origin_x", (IV)the_exit_down->x); RP->set ("origin_y", (IV)the_exit_down->y);