diff --git a/packages/entity/traits/alive.trait.js b/packages/entity/traits/alive.trait.js index e8cf785..84dd434 100644 --- a/packages/entity/traits/alive.trait.js +++ b/packages/entity/traits/alive.trait.js @@ -98,7 +98,10 @@ export class Alive extends decorate(Trait) { const packets = []; const {isDying, life, maxLife} = this.stateDifferences(); if (life || maxLife) { - packets.push(new TraitUpdateAlivePacket(this.state)); + packets.push(new TraitUpdateAlivePacket({ + life: this.state.life, + maxLife: this.state.maxLife, + })); } if (isDying) { packets.push(new DiedPacket()); diff --git a/packages/graphics/traits/visible.trait.js b/packages/graphics/traits/visible.trait.js index e81734c..5bdbdff 100644 --- a/packages/graphics/traits/visible.trait.js +++ b/packages/graphics/traits/visible.trait.js @@ -96,7 +96,10 @@ export class Visible extends decorate(Trait) { packets(informed) { const {isVisible, opacity} = this.stateDifferences(); if (isVisible || opacity) { - return new TraitUpdateVisiblePacket(this.state); + return new TraitUpdateVisiblePacket({ + isVisible: this.state.isVisible, + opacity: this.state.opacity, + }); } }