* @brief Checks if an open door can be closed * * In order to be able to close a door the space where the closed door would be must be free of bodies, monsters, players, and items * * @param doorPosition Map tile where the door is in its closed position * @return true if the door is free to be closed, false if anything is blocking it */
| 1651 | * @return true if the door is free to be closed, false if anything is blocking it |
| 1652 | */ |
| 1653 | inline bool IsDoorClear(const Object &door) |
| 1654 | { |
| 1655 | return dCorpse[door.position.x][door.position.y] == 0 |
| 1656 | && dMonster[door.position.x][door.position.y] == 0 |
| 1657 | && dItem[door.position.x][door.position.y] == 0 |
| 1658 | && dPlayer[door.position.x][door.position.y] == 0; |
| 1659 | } |
| 1660 | |
| 1661 | void UpdateDoor(Object &door) |
| 1662 | { |
no outgoing calls
no test coverage detected