Index: source/gui/ObjectTypes/CMiniMap.cpp =================================================================== --- source/gui/ObjectTypes/CMiniMap.cpp +++ source/gui/ObjectTypes/CMiniMap.cpp @@ -345,19 +345,20 @@ // which represents the view of the camera in the world. void CMiniMap::DrawViewRect(const CMatrix3D& transform) const { - // Compute the camera frustum intersected with a fixed-height plane. - // Use the water height as a fixed base height, which should be the lowest we can go - float h = g_Renderer.GetWaterManager()->m_WaterHeight; + // Compute the camera frustum intersected with an imaginary plane + // derived from the center-point of the camera's current view. + const float width = m_CachedActualSize.GetWidth(); const float height = m_CachedActualSize.GetHeight(); const float invTileMapSize = 1.0f / float(TERRAIN_TILE_SIZE * m_MapSize); const CCamera* camera = g_Game->GetView()->GetCamera(); + float planeHeight = camera->GetWorldCoordinates(g_Renderer.GetWidth() / 2, g_Renderer.GetHeight() / 2, true).Y; const std::array hitPoints = { - camera->GetWorldCoordinates(0, g_Renderer.GetHeight(), h), - camera->GetWorldCoordinates(g_Renderer.GetWidth(), g_Renderer.GetHeight(), h), - camera->GetWorldCoordinates(g_Renderer.GetWidth(), 0, h), - camera->GetWorldCoordinates(0, 0, h) + camera->GetWorldCoordinates(0, g_Renderer.GetHeight(), planeHeight), + camera->GetWorldCoordinates(g_Renderer.GetWidth(), g_Renderer.GetHeight(), planeHeight), + camera->GetWorldCoordinates(g_Renderer.GetWidth(), 0, planeHeight), + camera->GetWorldCoordinates(0, 0, planeHeight) }; std::vector lines;