fix: visible update
This commit is contained in:
parent
cfd6a5ef67
commit
8105ad2ad3
|
@ -74,9 +74,9 @@ export class Visible extends decorate(Trait) {
|
|||
}
|
||||
|
||||
acceptPacket(packet) {
|
||||
if (packet instanceof TraitUpdatedVisiblePacket) {
|
||||
if (packet instanceof TraitUpdateVisiblePacket) {
|
||||
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();
|
||||
if (isVisible || opacity) {
|
||||
return new TraitUpdateVisiblePacket(this.state);
|
||||
|
|
Loading…
Reference in New Issue
Block a user