Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unload zones when unload target is on the zone's edge #56483

Merged
merged 1 commit into from
Apr 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/activity_item_handling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2172,8 +2172,8 @@ void activity_on_turn_move_loot( player_activity &act, Character &you )
// if this item isn't going anywhere and its not sealed
// check if it is in a unload zone or a strip corpse zone
// then we should unload it and see what is inside
if( mgr.has_near( zone_type_zone_unload_all, abspos, 0 ) ||
( mgr.has_near( zone_type_zone_strip, abspos, 0 ) && it->first->is_corpse() ) ) {
if( mgr.has_near( zone_type_zone_unload_all, abspos, 1 ) ||
( mgr.has_near( zone_type_zone_strip, abspos, 1 ) && it->first->is_corpse() ) ) {
if( dest_set.empty() && !it->first->is_container_empty() && !it->first->any_pockets_sealed() ) {
for( item *contained : it->first->all_items_top( item_pocket::pocket_type::CONTAINER ) ) {
// no liquids don't want to spill stuff
Expand Down