Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monsters teleport through floors #36403

Closed
ymber opened this issue Dec 24, 2019 · 5 comments · Fixed by #36423
Closed

Monsters teleport through floors #36403

ymber opened this issue Dec 24, 2019 · 5 comments · Fixed by #36423
Labels
<Bug> This needs to be fixed Monsters Monsters both friendly and unfriendly. (S2 - Confirmed) Bug that's been confirmed to exist Z-levels Levels below and above ground.
Milestone

Comments

@ymber
Copy link
Member

ymber commented Dec 24, 2019

Describe the bug

Monsters teleport through the ground onto the surface from a lab beneath. Presumably this is a general behavior between any two z levels.

Steps To Reproduce

Steps to reproduce the behavior in the attached save:

  1. Wait 5 minutes

Expected behavior

Fungaloids don't teleport through the ground.

Versions and configuration

  • OS: Linux
    • OS Version: Kernel 5.4.5
  • Game Version: 0.D-10649-g82cb0bf [64-bit]
  • Graphics Version: Tiles
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    No Fictional Guns [no_rivtech_guns],
    No Flaming Weapons [no_flaming_weapons],
    No Rail Stations [No_Rail_Stations]
    ]

Additional context

Onyx.zip

@ymber ymber added <Bug> This needs to be fixed Monsters Monsters both friendly and unfriendly. Z-levels Levels below and above ground. labels Dec 24, 2019
@ymber ymber added this to the 0.E milestone Dec 24, 2019
@esotericist esotericist added the (S2 - Confirmed) Bug that's been confirmed to exist label Dec 24, 2019
@esotericist
Copy link
Contributor

I was able to confirm this on master using 5 to wait the long way, having a zombie scientist appear next to the character (so it isn't the extant safe mode notification issue).

@ghost
Copy link

ghost commented Dec 24, 2019

Indeed, spawning clairvoyance artifact and teleporting around gave me some idea on what is going on (related #36346) - It seems that when monsters enter (possibly also teleport trap) a portal they appear on player current z level, it stands to reason it is the same case for portals that are spawning monsters

@KorGgenT
Copy link
Member

a portal you say... if it's only portals, how much of a bug is this/ what do we want the limit of a portal to be?

@kevingranade
Copy link
Member

kevingranade commented Dec 25, 2019

A quick glance at the teleport code indicates that random teleports are using map calls with 2D functions, which implicitly target the level the player is on.

bool teleport::teleport( Creature &critter, int min_distance, int max_distance, bool safe,

@kevingranade
Copy link
Member

No I'm mistaken, it uses the 3D map functions, but never initializes the z component of the tripoint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed Monsters Monsters both friendly and unfriendly. (S2 - Confirmed) Bug that's been confirmed to exist Z-levels Levels below and above ground.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants