Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Spring.SetHeightMapFunc(ApplyHeightMap, Cells)
- function ApplyHeightMap(cells)
- for x = 0,sizeX,sqr do
- for z = 0,sizeZ,sqr do
- local height = cells[x][z] * flattenRatio + levelground -- avoid -2 < height < 2 because it looks weird...
- if height >= -1 and height <= 3 then
- height = 3
- end
- if height <= -150 then
- height = -150
- end
- SetHeightMap(x,z, height )
- end
- Spring.ClearWatchDogTimer()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement