mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
chunk flags converted to a bitfield
This commit is contained in:
parent
3e0455358a
commit
3003386670
12 changed files with 41 additions and 77 deletions
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue