diff --git a/code/game/source/world/world.c b/code/game/source/world/world.c index d7e150a..96f9687 100644 --- a/code/game/source/world/world.c +++ b/code/game/source/world/world.c @@ -350,6 +350,7 @@ int64_t world_chunk_from_entity(ecs_entity_t id) { void world_chunk_replace_block(int64_t id, uint16_t block_idx, uint8_t block_id) { assert(block_idx >= 0 && block_idx < zpl_square(world.chunk_size)); world.block_mapping[id][block_idx] = block_id; + world_chunk_mark_dirty(id); } uint8_t *world_chunk_get_blocks(int64_t id) { diff --git a/code/modules/source/controllers.c b/code/modules/source/controllers.c index 895074c..df0c90a 100644 --- a/code/modules/source/controllers.c +++ b/code/modules/source/controllers.c @@ -43,7 +43,6 @@ void DemoPlaceIceBlock(ecs_iter_t *it) { if (in[i].use) { world_block_lookup l = world_block_from_realpos(p[i].x, p[i].y); world_chunk_replace_block(l.chunk_id, l.id, watr_id); - world_chunk_mark_dirty(l.chunk_e); } } }