+ } else {
+ coord uc, tc;
+ struct rm *lev = &levl[u.ux][u.uy];
+ /* we want to categorize trajectory for use in determining
+ passage through doorways: horizonal, vertical, or diagonal;
+ since knight's jump and other irregular directions are
+ possible, we flatten those out to simplify door checks */
+ int diag, traj,
+ dx = x - u.ux, dy = y - u.uy,
+ ax = abs(dx), ay = abs(dy);
+
+ /* diag: any non-orthogonal destination classifed as diagonal */
+ diag = (magic || Passes_walls || (!dx && !dy)) ? jAny
+ : !dy ? jHorz : !dx ? jVert : jDiag;
+ /* traj: flatten out the trajectory => some diagonals re-classified */
+ if (ax >= 2 * ay)
+ ay = 0;
+ else if (ay >= 2 * ax)
+ ax = 0;
+ traj = (magic || Passes_walls || (!ax && !ay)) ? jAny
+ : !ay ? jHorz : !ax ? jVert : jDiag;
+ /* walk_path doesn't process the starting spot;
+ this is iffy: if you're starting on a closed door spot,
+ you _can_ jump diagonally from doorway (without needing
+ Passes_walls); that's intentional but is it correct? */
+ if (diag == jDiag && IS_DOOR(lev->typ)
+ && (lev->doormask & D_ISOPEN) != 0
+ && (traj == jDiag
+ || ((traj & jHorz) != 0) == (lev->horizontal != 0))) {
+ if (showmsg)
+/*JP
+ You_cant("jump diagonally out of a doorway.");
+*/
+ You_cant("\8fo\93ü\82è\8cû\82©\82ç\8eÎ\82ß\82É\94ò\82Ñ\8fo\82·\82±\82Æ\82Í\82Å\82«\82È\82¢\81D");
+ return FALSE;
+ }
+ uc.x = u.ux, uc.y = u.uy;
+ tc.x = x, tc.y = y; /* target */
+ if (!walk_path(&uc, &tc, check_jump, (genericptr_t) &traj)) {
+ if (showmsg)