| 42 | } |
| 43 | |
| 44 | float LiquidWorld::drainLevel(Vec2I const& location) const { |
| 45 | if (location[1] > m_worldServer->worldTemplate()->undergroundLevel()) { |
| 46 | auto const& tile = m_worldServer->getServerTile(location); |
| 47 | if (!m_materialDatabase->blocksLiquidFlow(tile.background)) { |
| 48 | auto const& belowTile = m_worldServer->getServerTile(location + Vec2I(0, -1)); |
| 49 | if (m_materialDatabase->blocksLiquidFlow(belowTile.background) || m_materialDatabase->blocksLiquidFlow(belowTile.foreground) || belowTile.liquid.source) |
| 50 | return m_liquidsDatabase->backgroundDrain(); |
| 51 | } |
| 52 | } |
| 53 | return 0.0f; |
| 54 | } |
| 55 | |
| 56 | CellularLiquidCell<LiquidId> LiquidWorld::cell(Vec2I const& location) const { |
| 57 | auto const& tile = m_worldServer->getServerTile(location); |
nothing calls this directly
no test coverage detected