aabb block shape WIP + common refactor

This commit is contained in:
MihailRis
2023-11-30 14:48:38 +03:00
parent 73d87ae451
commit 0c35eeb072
21 changed files with 177 additions and 76 deletions
+4 -2
View File
@@ -22,10 +22,12 @@ Content* ContentBuilder::build() {
vector<Block*> blockDefsIndices;
for (const string& name : blockIds) {
Block* def = blockDefs[name];
def->id = blockDefsIndices.size();
// Generating runtime info
def->rt.id = blockDefsIndices.size();
def->rt.emissive = *((uint32_t*)def->emission);
// build hitbox grid 3d for raycasts
// building hitbox grid 3d for raycasts
const AABB& hitbox = def->hitbox;
for (uint gy = 0; gy < BLOCK_AABB_GRID; gy++) {
for (uint gz = 0; gz < BLOCK_AABB_GRID; gz++) {