projects
/
super-star-trek.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3590e0f
)
Another step in subsuming navigation into the course object.
author
Eric S. Raymond
<esr@thyrsus.com>
Fri, 13 Oct 2006 02:46:16 +0000
(
02:46
+0000)
committer
Eric S. Raymond
<esr@thyrsus.com>
Fri, 13 Oct 2006 02:46:16 +0000
(
02:46
+0000)
src/sst.py
patch
|
blob
|
history
diff --git
a/src/sst.py
b/src/sst.py
index 33149f30dcd454bec93b83d6f344a993d5121dfd..6056bb287fb26552a974bb525355ca55a4c68e9f 100644
(file)
--- a/
src/sst.py
+++ b/
src/sst.py
@@
-3619,9
+3619,9
@@
def imove(course=None, novapush=False):
game.quad[game.sector.i][game.sector.j] = IHDOT
x = game.sector.i
y = game.sector.j
game.quad[game.sector.i][game.sector.j] = IHDOT
x = game.sector.i
y = game.sector.j
- n =
int(10.0*course.distance*bigger+0.5)
+ n =
course.moves
if n > 0:
if n > 0:
- for m in range(
1, n+1
):
+ for m in range(
n
):
x += deltax
y += deltay
w.i = int(round(x))
x += deltax
y += deltay
w.i = int(round(x))
@@
-3941,7
+3941,7
@@
class course:
self.increment = coord(-math.sin(self.angle), math.cos(self.angle))
bigger = max(abs(self.increment.i), abs(self.increment.j))
self.increment /= bigger
self.increment = coord(-math.sin(self.angle), math.cos(self.angle))
bigger = max(abs(self.increment.i), abs(self.increment.j))
self.increment /= bigger
- self.moves =
10*self.distance*bigger +0.5
+ self.moves =
int(round(10*self.distance*bigger))
def next(self, grain=1):
"Next step on course."
self.moves -=1
def next(self, grain=1):
"Next step on course."
self.moves -=1