projects
/
python-bulletml.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c8650dd
)
Action: Fix probable bug in direction handling when there's only one frame left.
author
Joe Wreschnig
<joe.wreschnig@gmail.com>
Wed, 17 Mar 2010 07:48:32 +0000
(
00:48
-0700)
committer
Joe Wreschnig
<joe.wreschnig@gmail.com>
Wed, 17 Mar 2010 07:48:32 +0000
(
00:48
-0700)
bulletml/impl.py
patch
|
blob
|
history
diff --git
a/bulletml/impl.py
b/bulletml/impl.py
index
a056d6c
..
fcb3aab
100644
(file)
--- a/
bulletml/impl.py
+++ b/
bulletml/impl.py
@@
-73,10
+73,13
@@
class Action(object):
self.owner.speed += self.speed
if self.direction_frames > 0:
self.owner.speed += self.speed
if self.direction_frames > 0:
+ # The Noiz implementation was a little weird here, I think
+ # there was a bug in it that prevented it from working if
+ # the frame count was 1. I'm still not sure what the aim
+ # check is supposed to do, exactly.
self.direction_frames -= 1
self.direction_frames -= 1
- if self.direction_frames <= 0:
- if self.aiming:
- self.owner.direction += self.owner.aim
+ if self.aiming and self.direction_frames <= 0:
+ self.owner.direction += self.owner.aim
else:
self.owner.direction += self.direction
else:
self.owner.direction += self.direction