From 8c2deb467b1636fece008549f1a3b8b415159ea5 Mon Sep 17 00:00:00 2001 From: zeropol Date: Fri, 30 Apr 2021 17:53:31 +0200 Subject: [PATCH] Update ballistics.cpp --- src/ballistics.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/ballistics.cpp b/src/ballistics.cpp index ff3ab4f987880..351de4cd6a98a 100644 --- a/src/ballistics.cpp +++ b/src/ballistics.cpp @@ -53,10 +53,9 @@ static void drop_or_embed_projectile( const dealt_projectile_attack &attack ) if( effects.count( "SHATTER_SELF" ) ) { // Drop the contents, not the thrown item add_msg_if_player_sees( pt, _( "The %s shatters!" ), drop_item.tname() ); - drop_item.visit_items( [&pt]( const item * it, item * ) { - get_map().add_item_or_charges( pt, *it ); - return VisitResponse::NEXT; - } ); + + // copies the drop item to spill the contents + item( drop_item ).spill_contents( pt ); // TODO: Non-glass breaking // TODO: Wine glass breaking vs. entire sheet of glass breaking