| 1860 | } |
| 1861 | |
| 1862 | void OperateDoor(Object &door, bool sendflag) |
| 1863 | { |
| 1864 | bool isCrypt = IsAnyOf(door._otype, OBJ_L5LDOOR, OBJ_L5RDOOR); |
| 1865 | bool openDoor = door._oVar4 == DOOR_CLOSED; |
| 1866 | |
| 1867 | if (!openDoor && !IsDoorClear(door)) { |
| 1868 | PlaySfxLoc(isCrypt ? IS_CRCLOS : IS_DOORCLOS, door.position); |
| 1869 | door._oVar4 = DOOR_BLOCKED; |
| 1870 | return; |
| 1871 | } |
| 1872 | |
| 1873 | if (openDoor) { |
| 1874 | PlaySfxLoc(isCrypt ? IS_CROPEN : IS_DOOROPEN, door.position); |
| 1875 | OpenDoor(door); |
| 1876 | } else { |
| 1877 | PlaySfxLoc(isCrypt ? IS_CRCLOS : IS_DOORCLOS, door.position); |
| 1878 | CloseDoor(door); |
| 1879 | } |
| 1880 | |
| 1881 | RedoPlayerVision(); |
| 1882 | |
| 1883 | if (sendflag) |
| 1884 | NetSendCmdLoc(MyPlayerId, true, openDoor ? CMD_OPENDOOR : CMD_CLOSEDOOR, door.position); |
| 1885 | } |
| 1886 | |
| 1887 | bool AreAllLeversActivated(int leverId) |
| 1888 | { |
no test coverage detected