Implement terrain rendering in OpenCS (Fixes #1597)
Avoid out of range exceptions.
Merge remote-tracking branch 'scrawl/terrain'