Prevent diagonal jump through open door
This commit is contained in:
+7
-1
@@ -544,9 +544,15 @@ int x, y;
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Passes_walls || !(may_pass = may_passwall(x, y))) {
|
if (!Passes_walls || !(may_pass = may_passwall(x, y))) {
|
||||||
if (IS_ROCK(levl[x][y].typ) || closed_door(x, y)) {
|
boolean odoor_diag = (IS_DOOR(levl[x][y].typ)
|
||||||
|
&& (levl[x][y].doormask & D_ISOPEN)
|
||||||
|
&& (u.ux - x) && (u.uy - y));
|
||||||
|
if (IS_ROCK(levl[x][y].typ) || closed_door(x, y)
|
||||||
|
|| odoor_diag) {
|
||||||
const char *s;
|
const char *s;
|
||||||
|
|
||||||
|
if (odoor_diag)
|
||||||
|
You("hit the door edge!");
|
||||||
pline("Ouch!");
|
pline("Ouch!");
|
||||||
if (IS_TREE(levl[x][y].typ))
|
if (IS_TREE(levl[x][y].typ))
|
||||||
s = "bumping into a tree";
|
s = "bumping into a tree";
|
||||||
|
|||||||
Reference in New Issue
Block a user