diff --git a/data.c b/data.c index f91090f..7800436 100755 --- a/data.c +++ b/data.c @@ -2398,7 +2398,7 @@ void initobjects(void) { addflag(lastot->flags, F_ONEPERCELL, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_IMPORTANT, B_TRUE, NA, NA, NULL); - addot(OT_TREEDOWN, "hollow tree leading down", "A huge hollow tree containing an ascending staircase.", MT_DRAGONWOOD, 3000, OC_DFEATURE, SZ_HUGE); + addot(OT_TREEDOWN, "hollow tree leading down", "A huge hollow tree containing a descending staircase.", MT_DRAGONWOOD, 3000, OC_DFEATURE, SZ_HUGE); addflag(lastot->flags, F_GLYPH, C_WOOD, '>', NA, NULL); addflag(lastot->flags, F_STAIRS, B_TRUE, NA, NA, NULL); addflag(lastot->flags, F_CLIMBABLE, D_DOWN, NA, NA, "hollow tree"); diff --git a/map.c b/map.c index 99c1ac8..a39ff95 100755 --- a/map.c +++ b/map.c @@ -4717,14 +4717,21 @@ void createmap(map_t *map, int depth, region_t *region, map_t *parentmap, int ex //if (gamemode == GM_GAMESTARTED) checkallflags(player->cell->map); // debugging - // did we come from a previous map in the same region? if (parentmap && (exitdir != D_NONE)) { - if ((parentmap->region->id == map->region->id) || - (map->region->rtype->majorbranch)) { - if (db) dblog(" linking to parentmap %s in dir %s", parentmap->name, getdirname(diropposite(exitdir))); + if (parentmap->region->id == map->region->id) { + // we came from a previous map in the same region + if (db) dblog(" linking to same region parentmap %s in dir %s", parentmap->name, getdirname(diropposite(exitdir))); + // ONLY change parent map's nextmap if it's + // in the same region. parentmap->nextmap[exitdir] = map->id; - assert(exitdir >= 0); map->nextmap[diropposite(exitdir)] = parentmap->id; + } else if (map->region->rtype->majorbranch) { + // we just arrived at the first map of a new region + if (db) dblog(" linking to diff region parentmap %s in dir %s", parentmap->name, getdirname(diropposite(exitdir))); + map->nextmap[diropposite(exitdir)] = parentmap->id; + // don't update parent map's nextmap[] since we + // want it to go to maps of the parent's + // region. } } //if (gamemode == GM_GAMESTARTED) checkallflags(player->cell->map); // debugging