OK, warp flight between quadrants works now.
authorEric S. Raymond <esr@thyrsus.com>
Thu, 5 Oct 2006 12:42:37 +0000 (12:42 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Thu, 5 Oct 2006 12:42:37 +0000 (12:42 +0000)
src/sst.py

index 8765aadfbc3cd18ae76516d82074b26724e62c94..aa22fe10418a10d26f86d952bd3a65b574e164df 100644 (file)
@@ -3906,10 +3906,10 @@ def imove(novapush):
                # Compute final position in new quadrant 
                if trbeam: # Don't bother if we are to be beamed 
                    return
-               game.quadrant.x = (w.x+(QUADSIZE-1))/QUADSIZE
-               game.quadrant.y = (w.y+(QUADSIZE-1))/QUADSIZE
-               game.sector.x = w.x - QUADSIZE*(game.quadrant.x-1)
-               game.sector.y = w.y - QUADSIZE*(game.quadrant.y-1)
+               game.quadrant.x = w.x/QUADSIZE
+               game.quadrant.y = w.y/QUADSIZE
+               game.sector.x = w.x - (QUADSIZE*game.quadrant.x)
+               game.sector.y = w.y - (QUADSIZE*game.quadrant.y)
                skip(1)
                prout(_("Entering Quadrant %s.") % game.quadrant)
                game.quad[game.sector.x][game.sector.y] = game.ship