From 4a5b7ef89342c22aecccfcd87a1e2bfdfcd3f6ec Mon Sep 17 00:00:00 2001 From: cohrs Date: Sun, 7 Jul 2002 07:18:05 +0000 Subject: [PATCH] special level alignments From the newsgroup a while back - special levels w/o a specific alignment should inherit their alignment from the dungeon. Some places explicitly checked the dungeon if the level alignment wasn't set, at least one did not. --- doc/fixes34.1 | 1 + src/dungeon.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index ec2051683..0e0479e57 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -146,6 +146,7 @@ no messages were printed when dowaterdemon or dowaternymph failed to create a monster doe to the G_GONE check knights should be able to avenge attacks from covetous monsters eating various rotten food items would not break vegan/vegetarian conduct +unaligned special levels should inherit alignment from the dungeon Platform- and/or Interface-Specific Fixes diff --git a/src/dungeon.c b/src/dungeon.c index 6e7b448b5..815d1dbb9 100644 --- a/src/dungeon.c +++ b/src/dungeon.c @@ -486,6 +486,9 @@ init_level(dgn, proto_index, pd) new_level->flags.maze_like = !!(tlevel->flags & MAZELIKE); new_level->flags.rogue_like = !!(tlevel->flags & ROGUELIKE); new_level->flags.align = ((tlevel->flags & D_ALIGN_MASK) >> 4); + if (!new_level->flags.align) + new_level->flags.align = + ((pd->tmpdungeon[dgn].flags & D_ALIGN_MASK) >> 4); new_level->rndlevs = tlevel->rndlevs; new_level->next = (s_level *) 0;