This commit is contained in:
@clasher113 2023-11-30 14:05:23 +02:00
commit c691183bf8
25 changed files with 194 additions and 77 deletions

View file

@ -23,10 +23,12 @@ Content* ContentBuilder::build() {
DrawGroups* groups = new DrawGroups;
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++) {