Page 1 of 1

Linux #127: repeated "teleport pc" quest action causes world falling outside [RESOLVED 0.11.4]

Posted: Wed Aug 22, 2018 2:59 pm
by Jay_H
Summary: Getting teleported to a dungeon via "teleport pc" works fine until you leave the dungeon. The game doesn't know what height to put you at, and can place you 50 meters above the ground or well below the surface.

(Repro quest expired, can recreate)

Steps: After starting the quest, use either "tele2exit" or "trans_out" console commands to leave repeatedly. The quest is programmed to trap you inside the dungeon. However, though the trigger works, it'll often send you under or over the world and cease recognizing location after the 2nd attempt or so.

Mods activated: None

Re: Linux #127: repeated "teleport pc" quest action causes world falling outside

Posted: Tue Dec 18, 2018 3:10 am
by Interkarma
I'm working on vampirism and believe I have another way to trigger this now. I'm fairly confident problem is related.
  1. Get infected (e.g. console "disease player vampire")
  2. Rent an inn, create a save, then rest until death.
  3. Exit dungeon after waking up.
  4. Reload previous save and rest until death again.
  5. Exit dungeon after waking up.
When exiting dungeon the second time, player and world are far outside of where game world should be. You might even see the exterior for a moment before falling into the void.

Jay, I'm taking a look at this one now and will let you know once resolved so you can test from quest actions again.

Re: Linux #127: repeated "teleport pc" quest action causes world falling outside

Posted: Tue Dec 18, 2018 5:04 am
by Interkarma
Jay, this should be fixed now in live code if you're able to test from there. Otherwise it will be in first 0.7 builds.

Problem was simply one of floating origin not being reset when chaining interiors together. When player went back into outside world the environment would be setup at obscene offsets where physics don't work and player simply falls through ground or pops off into madspace.

Roughly two hours of debugging to make a one-liner change to code. That's game dev for you. :)

Re: Linux #127: repeated "teleport pc" quest action causes world falling outside [RESOLVED]

Posted: Tue Dec 18, 2018 5:10 am
by Jay_H
Cool! I'll have to try it when 0.7 comes out but that's no problem. Thanks for looking into this.

Re: Linux #127: repeated "teleport pc" quest action causes world falling outside

Posted: Tue Dec 18, 2018 1:00 pm
by Hazelnut
Interkarma wrote: Tue Dec 18, 2018 5:04 am Jay, this should be fixed now in live code if you're able to test from there. Otherwise it will be in first 0.7 builds.

Problem was simply one of floating origin not being reset when chaining interiors together. When player went back into outside world the environment would be setup at obscene offsets where physics don't work and player simply falls through ground or pops off into madspace.

Roughly two hours of debugging to make a one-liner change to code. That's game dev for you. :)
Yeah, but this little bug has been eluding us for such a long time that's a massive win. Only 2 hours? That's a win! :D

Re: Linux #127: repeated "teleport pc" quest action causes world falling outside [RESOLVED]

Posted: Thu Dec 20, 2018 9:23 pm
by Jay_H
I'm making a quest with this action and the problem persists in #146. It seems to be as before. This save zip includes the text of the quest file I'm working on. If you enter the dungeon and exit twice, you'll be under the world.

Re: Linux #127: repeated "teleport pc" quest action causes world falling outside

Posted: Thu Dec 20, 2018 9:49 pm
by Interkarma
Thanks Jay! Seems the problems weren't related after all. I'll take a look when I can.

Re: Linux #127: repeated "teleport pc" quest action causes world falling outside

Posted: Sat May 01, 2021 1:03 am
by Interkarma
The issue here is related to parent task switching on/off between teleport actions. The teleport action does some followup work to reposition player after teleport completes. Because the action was switching off once player was outside, this followup work wasn't performed until player next teleported into dungeon. Then the previous followup would be called first, resulting in player desyncing from world.

I've fixed this specific bug, and teleport action needs a review in light of some other issues. This action might become non-rearmable in future, which would prevent quests like this from trapping player in a dungeon.