Selaa lähdekoodia

northern hemisphere works again

Malf 2 vuotta sitten
vanhempi
commit
8e43db3c31
2 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  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 scaleFact = 1000
 var radius = 1737.4*scaleFact
-var renderDistance = 2
+var renderDistance = 1
 
 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
 		# so we need to read the files from the end on the northern hemisphere
 		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)
 		else:
 			tc.file.seek(line + chunkPos.y*tc.resolution*4)