| 3543 | } |
| 3544 | |
| 3545 | BOOL PosOkPlayer(int pnum, int x, int y) |
| 3546 | { |
| 3547 | BOOL PosOK; |
| 3548 | DWORD p; |
| 3549 | char bv; |
| 3550 | |
| 3551 | PosOK = FALSE; |
| 3552 | if (x >= 0 && x < MAXDUNX && y >= 0 && y < MAXDUNY && !SolidLoc(x, y) && dPiece[x][y]) { |
| 3553 | |
| 3554 | if (dPlayer[x][y]) { |
| 3555 | if (dPlayer[x][y] > 0) { |
| 3556 | p = dPlayer[x][y] - 1; |
| 3557 | } else { |
| 3558 | p = -(dPlayer[x][y] + 1); |
| 3559 | } |
| 3560 | if (p != pnum && p < MAX_PLRS && plr[p]._pHitPoints) { |
| 3561 | return FALSE; |
| 3562 | } |
| 3563 | } |
| 3564 | |
| 3565 | if (dMonster[x][y]) { |
| 3566 | if (currlevel == 0) { |
| 3567 | return FALSE; |
| 3568 | } |
| 3569 | if (dMonster[x][y] <= 0) { |
| 3570 | return FALSE; |
| 3571 | } |
| 3572 | if ((monster[dMonster[x][y] - 1]._mhitpoints >> 6) > 0) { |
| 3573 | return FALSE; |
| 3574 | } |
| 3575 | } |
| 3576 | |
| 3577 | if (dObject[x][y]) { |
| 3578 | if (dObject[x][y] > 0) { |
| 3579 | bv = dObject[x][y] - 1; |
| 3580 | } else { |
| 3581 | bv = -(dObject[x][y] + 1); |
| 3582 | } |
| 3583 | if (object[bv]._oSolidFlag) { |
| 3584 | return FALSE; |
| 3585 | } |
| 3586 | } |
| 3587 | |
| 3588 | PosOK = TRUE; |
| 3589 | } |
| 3590 | |
| 3591 | if (!PosOK) |
| 3592 | return FALSE; |
| 3593 | return TRUE; |
| 3594 | } |
| 3595 | |
| 3596 | void MakePlrPath(int pnum, int xx, int yy, BOOL endspace) |
| 3597 | { |
no test coverage detected