--- deliantra/server/random_maps/exit.C 2006/12/31 20:46:17 1.17 +++ deliantra/server/random_maps/exit.C 2007/01/15 15:54:19 1.22 @@ -1,7 +1,7 @@ - /* CrossFire, A Multiplayer game for X-windows + Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team Copyright (C) 2001 Mark Wedel & Crossfire Development Team Copyright (C) 1992 Frank Tore Johansen @@ -119,7 +119,7 @@ void place_exits (maptile *map, char **maze, char *exitstyle, int orientation, random_map_params *RP) { - char styledirname[256]; + char styledirname[1024]; maptile *style_map_down = 0; /* harder maze */ maptile *style_map_up = 0; /* easier maze */ object *the_exit_down; /* harder maze */ @@ -304,9 +304,9 @@ if (the_exit_down) { - char buf[8192]; + char buf[16384]; - int i = find_first_free_spot (the_exit_down, map, downx, downy); + int i = 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]; RP->origin_x = the_exit_down->x; @@ -321,9 +321,11 @@ object *the_exit_back = arch_to_object (the_exit_up->arch); /* load it */ - if (!(new_map = maptile::load_map_sync (RP->final_map))) + if (!(new_map = maptile::find_sync (RP->final_map))) return; + new_map->load_sync (); + the_exit_down->slaying = RP->final_map; for (object *tmp = new_map->at (new_map->enter_x, new_map->enter_y).bot; tmp; tmp = tmp->above)