--- deliantra/server/random_maps/wall.C 2007/02/17 23:32:11 1.19 +++ deliantra/server/random_maps/wall.C 2007/06/04 12:19:09 1.22 @@ -94,13 +94,19 @@ int surround_index = 0; - if ((i > 0) && (GET_MAP_MOVE_BLOCK (map, i - 1, j) & ~MOVE_BLOCK_DEFAULT)) + // don't forget to update the mapspace! + if (i > 0) map->at (i - 1, j ).update (); + if (i < RP->Xsize - 1) map->at (i + 1, j ).update (); + if (j > 0) map->at (i , j - 1).update (); + if (j < RP->Ysize - 1) map->at (i , j + 1).update (); + + if ((i > 0) && (GET_MAP_MOVE_BLOCK (map, i - 1, j) & MOVE_WALK)) surround_index |= 1; - if ((i < RP->Xsize - 1) && (GET_MAP_MOVE_BLOCK (map, i + 1, j) & ~MOVE_BLOCK_DEFAULT)) + if ((i < RP->Xsize - 1) && (GET_MAP_MOVE_BLOCK (map, i + 1, j) & MOVE_WALK)) surround_index |= 2; - if ((j > 0) && (GET_MAP_MOVE_BLOCK (map, i, j - 1) & ~MOVE_BLOCK_DEFAULT)) + if ((j > 0) && (GET_MAP_MOVE_BLOCK (map, i, j - 1) & MOVE_WALK)) surround_index |= 4; - if ((j < RP->Ysize - 1) && (GET_MAP_MOVE_BLOCK (map, i, j + 1) & ~MOVE_BLOCK_DEFAULT)) + if ((j < RP->Ysize - 1) && (GET_MAP_MOVE_BLOCK (map, i, j + 1) & MOVE_WALK)) surround_index |= 8; return surround_index; @@ -157,7 +163,7 @@ int joinedwalls = 0; object *thiswall; - sprintf (RP->wall_name, "%s", &the_wall->arch->name); + sprintf (RP->wall_name, "%s", &the_wall->arch->archname); if ((cp = strchr (RP->wall_name, '_')) != NULL) { *cp = 0; @@ -198,7 +204,7 @@ char wall_name[1024]; archetype *wall_arch = 0; - assign (wall_name, the_wall->arch->name); + assign (wall_name, the_wall->arch->archname); /* conventionally, walls are named like this: wallname_wallcode, where wallcode indicates