forked from Interkarma/daggerfall-unity
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Unlock Castle Daggerfall doors after teleporting inside
Fixes Interkarma#1584. Tracks when player teleports into a dungeon using a flag set by Teleport effect. If player clicks on the two magically held doors in Castle Daggerfall after teleporting inside then these doors will unlock and open. Also works if player teleports from inside > inside, e.g. from foyer to anchor on other side of doors. Flag is lowered anytime player leaves interiors or teleports to a non-dungeon anchor. Test happens on every action click, but is very fast as using purely numerical comparisons without any scene searches. I'm not entirely happy with this here, but there's no other more satisfying place I can think of to intercept this click and change behaviour. This sequence of events is driven purely by classic gamedata actions, it's not coded into the game logic itself. To change this requires intercepting the action logic for these specific door records. Uses deterministic LoadID to identify DaggerfallAction on doors. This could theoretically change if player has non-standard gamedata, but then they can just click the guard through doors as per classic. This case only gets special handling as Castle Daggerfall is central to main plot and this scenario happens frequently enough to be an issue. There are many other places player can trap themselves in dungeons using a poorly placed Recall spell. This is on the player to manage intelligently. Limitation: This flag is not serialized, so if player exits game and starts up again before clicking on doors then "teleported into dungeon" flag is lost. But player can just anchor/teleport in place to trigger logic again, or resolve in some other way.
- Loading branch information
1 parent
ce11e06
commit e81b2d7
Showing
3 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters