DragonBreak #89: "teleport pc" quest action makes dungeon map hang [RESOLVED]

Locked
User avatar
Jay_H
Posts: 4062
Joined: Tue Aug 25, 2015 1:54 am
Contact:

DragonBreak #89: "teleport pc" quest action makes dungeon map hang [RESOLVED]

Post by Jay_H »

I'm using a quest with a basic teleport action to dungeon. I get teleported into the dungeon, but if I attempt to open the map, sometimes the map displays no dungeon at all, and closing the map then makes the game hang completely. This was flooded in player log:
NullReferenceException: Object reference not set to an instance of an object
at DaggerfallWorkshop.Game.DaggerfallAutomap.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)
This quest that I wrote does trigger it sometimes, except I believe if teleporting from another dungeon.
Last edited by Jay_H on Wed Oct 25, 2017 3:34 am, edited 1 time in total.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: DragonBreak #89: "teleport pc" quest action makes dungeon map hang

Post by Interkarma »

Thank you. Looks like the automap needs to initialise something not being satisfied by the teleport action.

I'll take a look and lean on Nystul if I need to, as he's the automap master.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: DragonBreak #89: "teleport pc" quest action makes dungeon map hang

Post by Interkarma »

I think all that was required here was for me to raise the OnTransitionDungeonInterior event from PlayerEnterExit when StartDungeonInterior() was called.

StartDungeonInterior() is the method used by "teleport pc" and can create a situation where player is able to teleport directly from one dungeon to another. Even the Shedungent/Mantellan teleports do this.

Prior to calling the event, the automap did not know the dungeon had changed, so the old automap would be left behind and sometimes crash. Now the event is being raised, the automap appears to refresh properly in both directions.

If you see this Nystul, would you be able to let me know if that's all we need or if there's something else I should be considering when player teleports directly from dungeon to dungeon?

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: DragonBreak #89: "teleport pc" quest action makes dungeon map hang

Post by Nystul »

I think only important thing is that a transition events callback from DaggerfallAutomap script needs to be reached - where the InitWhenInInteriorOrDungeon() is called inside. As far as I remember this should be enough. And if I understood correctly this happens with teleport since your latest changes.
If not I will fix any problem in case it does not work correctly. Just let me know ;)

Locked