diff --git a/client/src/animations.socket.jsx b/client/src/animations.socket.jsx index a7213957..fb0666b4 100644 --- a/client/src/animations.socket.jsx +++ b/client/src/animations.socket.jsx @@ -71,7 +71,6 @@ function createSocket(store) { // set the game state so resolutions don't fire twice store.dispatch(actions.setGame(game)); - ws.sendGameState(game.id); return true; }); } diff --git a/client/src/components/anims/sleep.jsx b/client/src/components/anims/sleep.jsx index f426d83b..a7d6be6b 100644 --- a/client/src/components/anims/sleep.jsx +++ b/client/src/components/anims/sleep.jsx @@ -70,10 +70,6 @@ class Sleep extends Component { } componentDidMount() { - anime.set('#sleep', { - translateY: 75, - }); - this.animations.push(anime({ targets: ['#sleep'], opacity: [ diff --git a/client/src/components/construct.jsx b/client/src/components/construct.jsx index 7c3306c1..b6793d82 100644 --- a/client/src/components/construct.jsx +++ b/client/src/components/construct.jsx @@ -113,6 +113,10 @@ class ConstructAvatar extends Component { } shouldComponentUpdate({ animSource, animTarget, construct }) { + if (construct !== this.props.construct) { + return true; + } + if (animSource === this.props.animSource && animTarget === this.props.animTarget) { // console.warn(construct.name, 'thinks its same props') return false; diff --git a/client/src/events.jsx b/client/src/events.jsx index 0b1b4fcd..f0a93581 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -78,7 +78,7 @@ function registerEvents(store) { store.dispatch(actions.setAnimSource(null)); store.dispatch(actions.setAnimTarget(null)); store.dispatch(actions.setAnimText(null)); - return setTimeout(cb, 50); + return cb(); }, timeout); }, err => {