Implemented height map recalculation