fix: visible update
This commit is contained in:
parent
cfd6a5ef67
commit
8105ad2ad3
|
@ -74,9 +74,9 @@ export class Visible extends decorate(Trait) {
|
||||||
}
|
}
|
||||||
|
|
||||||
acceptPacket(packet) {
|
acceptPacket(packet) {
|
||||||
if (packet instanceof TraitUpdatedVisiblePacket) {
|
if (packet instanceof TraitUpdateVisiblePacket) {
|
||||||
this.entity.isVisible = packet.data.isVisible;
|
this.entity.isVisible = packet.data.isVisible;
|
||||||
this.entity.opacity = packet.data.opacity / 255;
|
this.entity.opacity = packet.data.opacity;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ export class Visible extends decorate(Trait) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
packetsForUpdate() {
|
packets(informed) {
|
||||||
const {isVisible, opacity} = this.stateDifferences();
|
const {isVisible, opacity} = this.stateDifferences();
|
||||||
if (isVisible || opacity) {
|
if (isVisible || opacity) {
|
||||||
return new TraitUpdateVisiblePacket(this.state);
|
return new TraitUpdateVisiblePacket(this.state);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user