| 1716 | } |
| 1717 | |
| 1718 | bool WorldServer::signalRegion(RectI const& region) { |
| 1719 | auto sectors = m_worldStorage->sectorsForRegion(region); |
| 1720 | if (m_generatingDungeon) { |
| 1721 | // When generating a dungeon, all sector activations should immediately |
| 1722 | // load whatever is available and make the sector active for writing, but |
| 1723 | // should trigger no generation (for world generation speed). |
| 1724 | for (auto const& sector : sectors) |
| 1725 | m_worldStorage->loadSector(sector); |
| 1726 | } else { |
| 1727 | for (auto const& sector : sectors) |
| 1728 | m_worldStorage->queueSectorActivation(sector); |
| 1729 | } |
| 1730 | for (auto const& sector : sectors) { |
| 1731 | if (!m_worldStorage->sectorActive(sector)) |
| 1732 | return false; |
| 1733 | } |
| 1734 | return true; |
| 1735 | } |
| 1736 | |
| 1737 | void WorldServer::generateRegion(RectI const& region) { |
| 1738 | for (auto sector : m_worldStorage->sectorsForRegion(region)) |
no test coverage detected