Fix rewinds on changing rooms

This commit is contained in:
Uriziel 2013-07-03 17:39:06 +02:00
parent 1f49b49edf
commit a3d1c64791

View File

@ -254,11 +254,9 @@ class SyncFactory(Factory):
self._createRoomIfDoesntExist(room) self._createRoomIfDoesntExist(room)
with self._roomUpdate: with self._roomUpdate:
self._rooms[room][watcherProtocol] = watcher self._rooms[room][watcherProtocol] = watcher
self._roomStates[room]["position"] = watcher.position
self._roomStates[room]["setBy"] = watcher.name
self._roomStates[room]["lastUpdate"] = time.time()
self._deleteRoomIfEmpty(oldRoom) self._deleteRoomIfEmpty(oldRoom)
watcher.room = room watcher.room = room
self.sendState(watcherProtocol, True)
l = lambda w: w.sendUserSetting(watcher.name, watcher.room, None, None) l = lambda w: w.sendUserSetting(watcher.name, watcher.room, None, None)
self.broadcast(watcherProtocol, l) self.broadcast(watcherProtocol, l)