Mercurial > touhou
comparison pytouhou/game/game.py @ 336:72ef7e24b373
Fix MSG skipping.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sun, 01 Jul 2012 18:06:11 +0200 |
parents | 2350147cf043 |
children | 7a05edbab88a |
comparison
equal
deleted
inserted
replaced
335:2350147cf043 | 336:72ef7e24b373 |
---|---|
256 for enemy in self.enemies: | 256 for enemy in self.enemies: |
257 enemy.update() | 257 enemy.update() |
258 | 258 |
259 | 259 |
260 def update_msg(self, keystate): | 260 def update_msg(self, keystate): |
261 if keystate & 1 and not self.last_keystate & 1: | 261 if any((keystate & k and not self.last_keystate & k) for k in (1, 256)): |
262 self.msg_runner.skip() | 262 self.msg_runner.skip() |
263 if keystate & 256 and self.msg_runner.allow_skip: | 263 self.msg_runner.skipping = bool(keystate & 256) |
264 self.msg_runner.skip() | |
265 self.last_keystate = keystate | 264 self.last_keystate = keystate |
266 self.msg_runner.run_iteration() | 265 self.msg_runner.run_iteration() |
267 | 266 |
268 | 267 |
269 def update_players(self, keystate): | 268 def update_players(self, keystate): |