mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-09-11 13:31:07 -04:00
slight optimization
This commit is contained in:
parent
0d901b3842
commit
7e320c3bb0
@ -1211,9 +1211,12 @@ pub const Command = struct { // MARK: Command
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const serverId = user.?.inventoryClientToServerIdMap.get(self.inv.id) orelse unreachable;
|
if(side == .server) {
|
||||||
const source = Sync.ServerSide.inventories.items[serverId].source;
|
const serverId = user.?.inventoryClientToServerIdMap.get(self.inv.id) orelse unreachable;
|
||||||
if(side == .server and source == .blockInventory) {
|
const source = Sync.ServerSide.inventories.items[serverId].source;
|
||||||
|
|
||||||
|
if(source != .blockInventory) return;
|
||||||
|
|
||||||
const pos = source.blockInventory;
|
const pos = source.blockInventory;
|
||||||
|
|
||||||
const simChunk = main.server.world.?.getSimulationChunkAndIncreaseRefCount(pos[0], pos[1], pos[2]) orelse return;
|
const simChunk = main.server.world.?.getSimulationChunkAndIncreaseRefCount(pos[0], pos[1], pos[2]) orelse return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user