Fix fuzzer teleporting out of Fort Ludios

This commit is contained in:
Pasi Kallinen
2023-03-18 08:51:33 +02:00
parent f360dee4dd
commit e37428d5cd
4 changed files with 11 additions and 2 deletions

View File

@@ -1313,7 +1313,10 @@ place_branch(
}
if (br->type == BR_PORTAL) {
mkportal(x, y, dest->dnum, dest->dlevel);
if (u.ucamefrom.dnum || u.ucamefrom.dlevel)
mkportal(x, y, u.ucamefrom.dnum, u.ucamefrom.dlevel);
else
mkportal(x, y, dest->dnum, dest->dlevel);
} else if (make_stairs) {
boolean goes_up = on_level(&br->end1, &u.uz) ? br->end1_up
: !br->end1_up;