Use the Y floor coordinate from topo() so it doesn't ignore spaceship's modified floor height

fix-squashed-planets
Tomasz Kapuściński 2022-07-09 16:47:59 +02:00
parent 3fd9815138
commit ec425c768b
1 changed files with 1 additions and 1 deletions

View File

@ -4142,7 +4142,7 @@ bool CRobotMain::FreeSpace(Math::Vector &center, float minRadius, float maxRadiu
pos.x = p.x;
pos.z = p.y;
pos.y = 0.0f;
m_terrain->AdjustToFloor(pos, true);
pos.y = m_terrain->GetFloorLevel(pos);
if (!BlockedByObject(m_objMan.get(), pos, space, exclu))
{
float flat = m_terrain->GetFlatZoneRadius(pos, space);