chunk flags converted to a bitfield

This commit is contained in:
MihailRis
2024-05-31 11:59:12 +03:00
parent 3e0455358a
commit 3003386670
12 changed files with 41 additions and 77 deletions
+2 -2
View File
@@ -42,12 +42,12 @@ void Chunk::updateHeights() {
void Chunk::addBlockInventory(std::shared_ptr<Inventory> inventory,
uint x, uint y, uint z) {
inventories[vox_index(x, y, z)] = inventory;
setUnsaved(true);
flags.unsaved = true;
}
void Chunk::removeBlockInventory(uint x, uint y, uint z) {
if (inventories.erase(vox_index(x, y, z))) {
setUnsaved(true);
flags.unsaved = true;
}
}