fix: inventory self-swapping
This commit is contained in:
parent
0cb5cdbe1f
commit
997ef691ca
|
@ -215,8 +215,10 @@ export default class Inventory extends Component {
|
|||
delete otherSlots[r];
|
||||
}
|
||||
Component.markChange(this.entity, 'swapped', [[l, OtherInventory.entity, r]]);
|
||||
if (this.entity !== OtherInventory.entity) {
|
||||
Component.markChange(OtherInventory.entity, 'swapped', [[r, this.entity, l]]);
|
||||
}
|
||||
}
|
||||
toNet(recipient, data) {
|
||||
if (recipient.id !== this.entity && this !== recipient.Player.openInventory) {
|
||||
return {};
|
||||
|
|
Loading…
Reference in New Issue
Block a user