CM_ReadPortalState reads the portal state from a savegame file and recalculates the area connections.
(RandomAccessFile f)
| 1735 | * connections. |
| 1736 | */ |
| 1737 | public void CM_ReadPortalState(RandomAccessFile f) { |
| 1738 | |
| 1739 | //was: FS_Read(portalopen, sizeof(portalopen), f); |
| 1740 | int len = portalopen.length * 4; |
| 1741 | |
| 1742 | byte buf[] = new byte[len]; |
| 1743 | |
| 1744 | FS.Read(buf, len, f); |
| 1745 | |
| 1746 | ByteBuffer bb = ByteBuffer.wrap(buf); |
| 1747 | IntBuffer ib = bb.asIntBuffer(); |
| 1748 | |
| 1749 | for (int n = 0; n < portalopen.length; n++) |
| 1750 | portalopen[n] = ib.get() != 0; |
| 1751 | |
| 1752 | FloodAreaConnections(); |
| 1753 | } |
| 1754 | |
| 1755 | /** |
| 1756 | * CM_HeadnodeVisible returns true if any leaf under headnode has a cluster that is potentially |
no test coverage detected