Permalink
Browse files

fixed match's restart

  • Loading branch information...
cflavio committed Sep 10, 2018
1 parent a25e7d1 commit 5f6dd3fddac47666e18a68712260c986f7abe3bc
Showing with 17 additions and 3 deletions.
  1. +6 −0 menu/carpage.py
  2. +6 −0 menu/driverpage.py
  3. +3 −1 menu/mainpage.py
  4. +1 −0 menu/multiplayer/multiplayerfrm.py
  5. +0 −1 project.py
  6. +1 −1 yyagl
View
@@ -246,6 +246,12 @@ def on_start_drivers(self, data_lst):
page_args = [self.track_path, self.car, self.props]
self.notify('on_push_page', 'driverpageclient', page_args)
def destroy(self):
self.yorg_client.detach(self.on_car_selection)
self.yorg_client.detach(self.on_car_deselection)
self.yorg_client.detach(self.on_start_drivers)
CarPageGui.destroy(self)
class CarPage(Page):
gui_cls = CarPageGui
View
@@ -354,6 +354,12 @@ def on_start_race(self, data_lst):
self.notify('on_car_start_client', self.mediator.track,
self.mediator.car, cars, data_lst)
def destroy(self):
self.yorg_client.detach(self.on_drv_selection)
self.yorg_client.detach(self.on_drv_deselection)
self.yorg_client.detach(self.on_start_race)
DriverPageGui.destroy(self)
class DriverPage(Page):
gui_cls = DriverPageGui
View
@@ -56,7 +56,9 @@ def __init__(self, mediator, mainpage_props, yorg_client):
yorg_client.restart()
while not self.eng.client.netw_thr: pass
# wait for the thread
ret_val = self.eng.client.login(user, password)
ret_val = 'ok'
if not yorg_client.authenticated:
ret_val = self.eng.client.login(user, password)
if ret_val in ['invalid_nick', 'unregistered_nick', 'wrong_pwd']:
return self.on_ko(ret_val)
taskMgr.doMethodLater(.1, lambda task: self.on_ok(), 'x')
@@ -430,6 +430,7 @@ def process_msg_client(self, data_lst, sender):
def on_track_selected_msg(self, track):
self.eng.log_mgr.log('track selected: ' + track)
self.yorg_client.detach(self.on_track_selected_msg)
self.notify('on_start_match_client', track)
self.users_frm.set_size(False)
self.msg_frm.show()
View
@@ -4,7 +4,6 @@
# TODO LIST =====
# 0.10
# clean rooms when people exit
# consecutive multiplayer races
# 0.11 (local multiplayer)
2 yyagl

0 comments on commit 5f6dd3f

Please sign in to comment.