fix player bug
This commit is contained in:
@@ -10,7 +10,6 @@ const addState = connect(
|
||||
function receiveState(state) {
|
||||
const {
|
||||
ws,
|
||||
account,
|
||||
instance,
|
||||
player,
|
||||
combiner,
|
||||
|
||||
@@ -120,10 +120,11 @@ function registerEvents(store) {
|
||||
if (v) {
|
||||
ws.startInstanceStateTimeout(v.id);
|
||||
|
||||
const player = v.players.find(p => p.id === account.id);
|
||||
store.dispatch(actions.setPlayer(player));
|
||||
|
||||
if (!instance || v.id !== instance.id) {
|
||||
store.dispatch(actions.setNav('vbox'));
|
||||
const player = v.players.find(p => p.id === account.id);
|
||||
store.dispatch(actions.setPlayer(player));
|
||||
const first = player.constructs[0];
|
||||
store.dispatch(actions.setActiveConstruct(first));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user