demo: reduce code

isolation_bkp/dynres
Dominik Madarász 2021-07-27 13:41:02 +02:00
parent 0cb52303ae
commit 3e59e59881
2 changed files with 1 additions and 1 deletions

View File

@ -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) {

View File

@ -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);
}
}
}