Browse Source

northern hemisphere works again

Malf 2 years ago
parent
commit
8e43db3c31
2 changed files with 2 additions and 2 deletions
  1. 1 1
      ChunkSystem.gd
  2. 1 1
      TopoLoader.gd

+ 1 - 1
ChunkSystem.gd

@@ -6,7 +6,7 @@ onready var Player = $"../Player"
 var resolution = 512
 var resolution = 512
 var scaleFact = 1000
 var scaleFact = 1000
 var radius = 1737.4*scaleFact
 var radius = 1737.4*scaleFact
-var renderDistance = 2
+var renderDistance = 1
 
 
 var chunkIndex = {}
 var chunkIndex = {}
 
 

+ 1 - 1
TopoLoader.gd

@@ -104,7 +104,7 @@ func cacheChunk(chunkPos: Vector2):
 		# the origin of each .img file lies in it's upper left corner
 		# the origin of each .img file lies in it's upper left corner
 		# so we need to read the files from the end on the northern hemisphere
 		# so we need to read the files from the end on the northern hemisphere
 		if lat >= 0:
 		if lat >= 0:
-			var origin = (chunkPos.x + 1.0)*tc.resolution*tc.samplesPerLine*4
+			var origin = tc.lines*tc.samplesPerLine*4
 			tc.file.seek((origin - line) + chunkPos.y*tc.resolution*4)
 			tc.file.seek((origin - line) + chunkPos.y*tc.resolution*4)
 		else:
 		else:
 			tc.file.seek(line + chunkPos.y*tc.resolution*4)
 			tc.file.seek(line + chunkPos.y*tc.resolution*4)