diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx
index 68e53cad..a5c163c2 100644
--- a/client/src/components/game.construct.jsx
+++ b/client/src/components/game.construct.jsx
@@ -59,11 +59,16 @@ class GameConstruct extends preact.Component {
player,
} = this.props;
- const ko = construct.green_life.value === 0 ? 'ko' : '';
+ // construct green_life comes from game state and won't update during animations
+ // treat the construct as ko for the remainder of the anims if ko event occurs
+ const ko = construct.green_life.value === 0 || this.ko ? 'ko' : '';
const koEvent = () => {
if (resolution) {
const [type, variant] = resolution.event;
- if (variant.construct === construct.id && type === 'Ko') return 'ko-transition';
+ if (variant.construct === construct.id && type === 'Ko') {
+ this.ko = true;
+ return 'ko-transition';
+ }
}
return '';
};
diff --git a/client/src/components/header.jsx b/client/src/components/header.jsx
index 734b1761..bcc286a6 100644
--- a/client/src/components/header.jsx
+++ b/client/src/components/header.jsx
@@ -8,6 +8,7 @@ const addState = connect(
const {
ws,
account,
+ authenticated,
nav,
} = state;
@@ -22,6 +23,7 @@ const addState = connect(
return {
account,
+ authenticated,
nav,
sendInstanceState,
@@ -48,6 +50,7 @@ const addState = connect(
function Header(args) {
const {
account,
+ authenticated,
nav,
sendAccountStates,
@@ -56,6 +59,8 @@ function Header(args) {
if (!account) return false;
+ if (!authenticated) return false;
+
function navTo(p) {
return setNav(p);
}
@@ -68,11 +73,6 @@ function Header(args) {
return (
-