From 797c23e8c5d758fc7df0b4da75be291c86794487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Wed, 3 Nov 2021 17:17:48 +0100 Subject: [PATCH] don't replace foreign blocks --- code/game/src/items.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/src/items.c b/code/game/src/items.c index faaa833..c96ebd6 100644 --- a/code/game/src/items.c +++ b/code/game/src/items.c @@ -62,6 +62,8 @@ void item_use(ecs_world_t *ecs, ItemDrop *it, Position p, uint64_t udata) { // NOTE(zaklaus): If we replace the same item, refund 1 qty and let it replace it if (item_asset_id == item_id) { it->quantity++; + } else { + return; } } world_chunk_replace_block(l.chunk_id, l.id, blocks_find(desc->place.kind + (asset_id)udata));