Apply trap door destination restrictions in dodown
Missed this way to use the trap door (in a block added in 05761ba) in
previous commits, though I'm a little confused about whether that block
in dodown is even reachable given how various trap scenarios are handled
with dotrap earlier in the function.
This commit is contained in:
committed by
Pasi Kallinen
parent
81285b661e
commit
e148d5e925
7
src/do.c
7
src/do.c
@@ -1145,8 +1145,11 @@ dodown(void)
|
|||||||
}
|
}
|
||||||
if (trap && Is_stronghold(&u.uz)) {
|
if (trap && Is_stronghold(&u.uz)) {
|
||||||
goto_hell(FALSE, TRUE);
|
goto_hell(FALSE, TRUE);
|
||||||
} else if (trap) {
|
} else if (trap && trap->dst.dlevel != -1) {
|
||||||
goto_level(&(trap->dst), FALSE, FALSE, FALSE);
|
d_level tdst;
|
||||||
|
assign_level(&tdst, &(trap->dst));
|
||||||
|
(void) clamp_hole_destination(&tdst);
|
||||||
|
goto_level(&tdst, FALSE, FALSE, FALSE);
|
||||||
} else {
|
} else {
|
||||||
g.at_ladder = (boolean) (levl[u.ux][u.uy].typ == LADDER);
|
g.at_ladder = (boolean) (levl[u.ux][u.uy].typ == LADDER);
|
||||||
next_level(!trap);
|
next_level(!trap);
|
||||||
|
|||||||
Reference in New Issue
Block a user