From 763aee0590fe1d269d4f758de99b9fb79c5fde70 Mon Sep 17 00:00:00 2001 From: AdamPlenty <58278560+AdamPlenty@users.noreply.github.com> Date: Sun, 24 Jul 2022 19:50:21 +0100 Subject: [PATCH] You can now pick up gold in frail corners Fixes #1517 --- src/magic.c | 9 +++++++-- src/packets_input.c | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/magic.c b/src/magic.c index 0ded7f892c..d829223de8 100644 --- a/src/magic.c +++ b/src/magic.c @@ -584,7 +584,8 @@ TbBool can_cast_power_at_xy(PlayerNumber plyr_idx, PowerKind pwkind, } PlayerNumber slb_owner; slb_owner = slabmap_owner(slb); - if ((mapblk->flags & SlbAtFlg_Blocking) != 0) + TbBool subtile_is_liquid = ( (subtile_has_water_on_top(stl_x, stl_y)) || (subtile_has_lava_on_top(stl_x, stl_y)) ); + if ( ((mapblk->flags & SlbAtFlg_Blocking) != 0) && (!subtile_is_liquid) ) { if ((can_cast & PwCast_Claimable) != 0) { @@ -626,7 +627,7 @@ TbBool can_cast_power_at_xy(PlayerNumber plyr_idx, PowerKind pwkind, { if ((can_cast & PwCast_Claimable) != 0) { - if (slab_kind_is_liquid(slb->kind)) + if ( (slab_kind_is_liquid(slb->kind)) || (subtile_is_liquid) ) { return false; } @@ -641,6 +642,10 @@ TbBool can_cast_power_at_xy(PlayerNumber plyr_idx, PowerKind pwkind, if (slbattr->category == SlbAtCtg_Unclaimed) { return true; } + if (subtile_is_liquid) + { + return true; + } } if ((can_cast & PwCast_NeutrlGround) != 0) { diff --git a/src/packets_input.c b/src/packets_input.c index d93cdf8cee..a2ad64b11e 100644 --- a/src/packets_input.c +++ b/src/packets_input.c @@ -261,6 +261,7 @@ TbBool process_dungeon_control_packet_dungeon_control(long plyr_idx) { if (player->primary_cursor_state == CSt_PickAxe) { + player->thing_under_hand = 0; get_dungeon_highlight_user_roomspace(&playeradd->render_roomspace, player->id_number, stl_x, stl_y); tag_cursor_blocks_dig(player->id_number, stl_x, stl_y, player->full_slab_cursor); }