Skip to content

Commit

Permalink
Fixes a bug that tied up the event queue if entering service mode dur…
Browse files Browse the repository at this point in the history
…ing event processing (e.g., enter service mode during end of ball/game and on exit, game logic would not resume properly)
  • Loading branch information
mjocean committed Sep 25, 2017
1 parent 25af003 commit a54d720
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion procgame/game/skeletongame.py
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,9 @@ def reset(self):
# clear the notification list
self.notify_list = []
self.event_complete_fn = None
#self.sg_event_queue = [] # <-- do NOT clear the queue, if something is waiting it might matter
self.sg_event_queue = []
self.switchmonitor.cancel_delayed(name='notifyNextMode')
self.event = None

super(SkeletonGame,self).reset()

Expand Down
2 changes: 1 addition & 1 deletion procgame/modes/attract.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ def reset(self):
self.start_button_lamp.disable()

if(self.layer is not None):
self.layer.regenerate()
self.layer.reset()
self.layer.regenerate()
pass

def sw_flipperLwL_active_for_50ms(self, sw):
Expand Down

0 comments on commit a54d720

Please sign in to comment.