0

Change to a better looking and better maintainable code. (thanks blixt)

This commit is contained in:
Alejandro Aguilera
2011-01-05 15:09:55 +01:00
parent 23b7e90c54
commit ad9756fa8c

View File

@@ -220,11 +220,10 @@ class WorldRenderer(object):
inChunkZ = spawnZ - (chunkY*16) inChunkZ = spawnZ - (chunkY*16)
## find the first air block ## find the first air block
while (blockArray[inChunkX, inChunkZ, spawnY] != 0 and spawnY != 127): while (blockArray[inChunkX, inChunkZ, spawnY] != 0):
spawnY += 1 spawnY += 1
if spawnY == 128:
if spawnY == 127 and blockArray[inChunkX, inChunkZ, spawnY] != 0 : break
spawnY = 128 # get the right spawnY coordinate for markers.js
self.POI.append( dict(x=spawnX, y=spawnY, z=spawnZ, self.POI.append( dict(x=spawnX, y=spawnY, z=spawnZ,
msg="Spawn", type="spawn", chunk=(inChunkX,inChunkZ))) msg="Spawn", type="spawn", chunk=(inChunkX,inChunkZ)))