Improved terrain height normalization

Now intelligently lowers or raises the terrain depending on whether it's
above or below origin.