Skip to content

Commit

Permalink
No magic dissectables
Browse files Browse the repository at this point in the history
  • Loading branch information
RenechCDDA committed May 8, 2024
1 parent eefe407 commit 115b6d9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3086,6 +3086,9 @@ void monster::spawn_dissectables_on_death( item *corpse )
if( type->dissect.is_empty() ) {
return;
}
if( !corpse ) {
return;
}

for( const harvest_entry &entry : *type->dissect ) {
std::vector<item> dissectables = item_group::items_from( item_group_id( entry.drop ),
Expand All @@ -3101,8 +3104,6 @@ void monster::spawn_dissectables_on_death( item *corpse )
}
if( corpse ) {
corpse->put_in( dissectable, pocket_type::CORPSE );
} else {
get_map().add_item_or_charges( pos(), dissectable );
}
}
}
Expand Down

0 comments on commit 115b6d9

Please sign in to comment.