Advertisement
Guest User

Untitled

a guest
Aug 31st, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. Spring.SetHeightMapFunc(ApplyHeightMap, Cells)
  2.  
  3. function ApplyHeightMap(cells)
  4. for x = 0,sizeX,sqr do
  5. for z = 0,sizeZ,sqr do
  6. local height = cells[x][z] * flattenRatio + levelground -- avoid -2 < height < 2 because it looks weird...
  7. if height >= -1 and height <= 3 then
  8. height = 3
  9. end
  10. if height <= -150 then
  11. height = -150
  12. end
  13. SetHeightMap(x,z, height )
  14. end
  15. Spring.ClearWatchDogTimer()
  16. end
  17. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement