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

More accurate checking in layering conflicts #54897

Merged
merged 2 commits into from
Jan 30, 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: 3 additions & 1 deletion src/character_attire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -805,9 +805,11 @@ static void layer_item( std::map<bodypart_id, encumbrance_data> &vals, const ite
bool conflicts = false;

// add the sublocations to the overall body part layer and update if we are conflicting
if( it.has_sublocations() && item_layer >= highest_layer_so_far[bp] ) {
if( !bp->sub_parts.empty() && item_layer >= highest_layer_so_far[bp] ) {
conflicts = vals[bp].add_sub_locations( item_layer, it.get_covered_sub_body_parts() );
} else {
// the body part doesn't have sublocations it for sure conflicts
// if its on the wrong layer it for sure conflicts
conflicts = true;
}

Expand Down