mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 19:41:51 +00:00
Merge branch 'main' into physics-upgrade
This commit is contained in:
commit
3cd6ce1df2
13 changed files with 93 additions and 26 deletions
|
|
@ -1,13 +1,13 @@
|
|||
#include "Chunk.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "content/ContentReport.hpp"
|
||||
#include "items/Inventory.hpp"
|
||||
#include "lighting/Lightmap.hpp"
|
||||
#include "util/data_io.hpp"
|
||||
#include "voxel.hpp"
|
||||
|
||||
#include <utility>
|
||||
|
||||
Chunk::Chunk(int xpos, int zpos, std::shared_ptr<Lightmap> lightmap)
|
||||
: x(xpos), z(zpos), lightmap(std::move(lightmap)) {
|
||||
bottom = 0;
|
||||
|
|
@ -40,6 +40,7 @@ void Chunk::addBlockInventory(
|
|||
void Chunk::removeBlockInventory(uint x, uint y, uint z) {
|
||||
if (inventories.erase(vox_index(x, y, z))) {
|
||||
flags.unsaved = true;
|
||||
flags.inventoriesRemoved = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ public:
|
|||
bool entities : 1;
|
||||
bool blocksData : 1;
|
||||
bool dirtyHeights : 1;
|
||||
bool inventoriesRemoved : 1;
|
||||
} flags {};
|
||||
|
||||
uint64_t lastRandomTickId = -1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue