There is code in fixup_special for stocking Medusa's lair with statues of players from the leaderboard. It makes two assumptions: that there will always be at least one room defined on Medusa's level, and that the statues should be placed in the first room defined. In the process of removing prefilled, some of these rooms suddenly became non-rooms, and this caused problems. This commit ensures that the regions for turning into rooms to hold the statues are present and come first. In the process of writing this commit, I discovered a bug: the statue stocking code for medusa in fixup_special naively chooses the spot at which to place its final statue by selecting independent x and y coordinates with somex and somey. This is responsible for a statue occasionally being embedded in a wall or in iron bars on medusa-2 and medusa-4: the rooms defined to receive statues are irregular, and some of the possible coordinates happen to be walls, bars, and water. The proper fix here is to add lua functionality so that the level designer can specify that they want a leaderboard corpse or statue, and remove the medusa special case from fixup_special, but that's rather out of scope for what I'm doing here.
5.5 KiB
5.5 KiB