Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: different archfiend levels had same bonetag
Since the lawdemon1/2 and chaosdemon1/2 levels had a bonetag that was constant for that branch, it was possible to load bones with the wrong level. This meant that if someone left bones on Geryon's level in Asphodel, and someone else's game placed Geryon in Cocytus, the Cocytus level could generate Geryon's pasture normally, and the Asphodel level would also be Geryon's pasture, restored from the bones file. (But humorously, entering the throne room in the Asphodel level in this example would still summon Baalzebub, since the dungeon structure knows it's his level.) Fix this by changing the bonetag dynamically based on the resident archfiend, the same as how it works for the level name. This means that e.g. in Cocytus, a bonC0.B Baalz file can coexist with a bonC0.G Geryon file, and when bones are loaded, the game will only find the one with the correct tag, if it exists. That is, if a game's dungeon structure puts Baalzebub in Cocytus, the player enters the appropriate level of Cocytus, and there is only a Cocytus-Geryon bones file, it won't be selected; nor will a Asphodel-Baalzebub bones file. This change shouldn't break any existing bones files, but it should render them incapable of loading.
- Loading branch information