Hostiles going up and down stairs

Whatever code lets hostiles follow you up and down stairs seems a bit strange right now.

version 0.B-2815

fighting a horde round a LMOE shelter, zombies immediately outside the door can follow me down the stairs, even when the door is firmly closed. They just teleport down there. In addition, the river in the LMOE shelter was infested with some rather aggressive fish - so aggressive that THEY TOO followed me up the stairs on the return journey out, before swiftly dying as the realised they can’t actually breathe air.

TL;DR:

-Zombies teleporting through doors to follow you down stairs
-fish teleporting out of water to follow me up stairs.

It’s because it was not easy to implement stuff between levels, so it was some kind of quick fix that takes a zone around the stairs and teleports the creatures. Iirc!

The teleporting through doors thing is a result of zombies thinking they can open doors when finding a path. I guess I’ll need to invent some ugly hack for it not to happen.
Old pathfinding code was quite simple and resulted in NPCs not being able to open doors (or windows. or car doors. or even bash things). New pathfinding code is more proper, but it now results in zombies reactivating their brain parts concerned with door knobs.

Fish teleporting out of water is probably not a new thing, just that they should never spawn there. Will require a separate ugly hack.

I hate the monster stair code. It is so hacky. The sooner I replace it with a proper z-level code the better.

Actually, now that I think of it, I found that sometimes around when being able to build a set of stairs down into the dirt to form a basement was implemented, that when I did so, if I fled downstairs and there was nowhere for an enemy to path too because I was blocking the staircase, the game would freeze. Presumably stuck in some infinite loop or something because it can’t place an enemy.

I don’t know if that is still a thing though because now I have no reason not to kill everything before going down a set of stairs I created anyway.

Infinite loop occurred for a different reason - when a monster is trying to spawn on you and it can’t push you away, it attacks you and drains 100 moves. If your speed is lower than 100, this means you are now stunlocked until you die. If your armor is good enough, this death will be from starvation.

I lowered that move drain to 50 due to it interfering with testing, but if your speed is lower than that, you’ll still get that stunlock.

Infinite loop occurred for a different reason - when a monster is trying to spawn on you and it can't push you away, it attacks you and drains 100 moves. If your speed is lower than 100, this means you are now stunlocked until you die. If your armor is good enough, this death will be from starvation.
OMG. [me=EditorRUS]remembers his battle with dozens of amigara horrors[/me] Shit me someone. Those bastards somehow managed to activate something BAD and I had to edit my savefile since I had had literally -100 000 moves. Fun thing is that despite being stunlocked my character would not get a single scratch on his face. Dodgy and armored God of Code. By the way, he didn't die of starvation. This stunlock happened for absolutely no reason whatsoever (I was intelligent enough to not be paralyzed) so I considered this as a bug.

[quote=“Haerdalas, post:1, topic:9052”]Whatever code lets hostiles follow you up and down stairs seems a bit strange right now.

version 0.B-2815

fighting a horde round a LMOE shelter, zombies immediately outside the door can follow me down the stairs, even when the door is firmly closed. They just teleport down there. In addition, the river in the LMOE shelter was infested with some rather aggressive fish - so aggressive that THEY TOO followed me up the stairs on the return journey out, before swiftly dying as the realised they can’t actually breathe air.

TL;DR:

-Zombies teleporting through doors to follow you down stairs
-fish teleporting out of water to follow me up stairs.[/quote]

Today I got a similiar situation, when I tried to get out from the challenge lab scenario. When I climbed to the surface level of the lab a couple of times I got Z-es from nearby horde spawning in (presumably) closed lab building. I tried so hard to chop all of 'em with my machete but they just keep coming. And then some shocker brutes finished me off.