From c619211a8b00f36b073bc9aa88836831efed75c6 Mon Sep 17 00:00:00 2001 From: Fris0uman Date: Sun, 29 Dec 2024 19:01:14 +0100 Subject: [PATCH] Only pass the Bp hit to apply_effects_nodamage --- src/creature.cpp | 6 +++--- src/projectile.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/creature.cpp b/src/creature.cpp index f5e728086f10e..ece47635880c9 100644 --- a/src/creature.cpp +++ b/src/creature.cpp @@ -972,7 +972,7 @@ double Creature::accuracy_projectile_attack( dealt_projectile_attack &attack ) c } void projectile::apply_effects_nodamage( Creature &target, Creature *source, - const dealt_damage_instance &dealt_dam, bool soaked_through ) const + const bodypart_id &bp_hit, bool soaked_through ) const { bool is_liquid = proj_effects.count( ammo_effect_LIQUID ); if( proj_effects.count( ammo_effect_BOUNCE ) ) { @@ -984,7 +984,7 @@ void projectile::apply_effects_nodamage( Creature &target, Creature *source, if( on_hit_eff.need_touch_skin && is_liquid && !soaked_through ) { continue; } - target.add_effect( on_hit_eff.effect, on_hit_eff.duration, dealt_dam.bp_hit, false, + target.add_effect( on_hit_eff.effect, on_hit_eff.duration, bp_hit, false, on_hit_eff.intensity ); } } @@ -1380,7 +1380,7 @@ void Creature::deal_projectile_attack( Creature *source, dealt_projectile_attack proj.apply_effects_damage( *this, source, dealt_dam, goodhit < accuracy_critical ); - proj.apply_effects_nodamage( *this, source, dealt_dam, soaked_through ); + proj.apply_effects_nodamage( *this, source, dealt_dam.bp_hit, soaked_through ); if( print_messages ) { messaging_projectile_attack( source, hit_selection, dealt_dam.total_damage() ); diff --git a/src/projectile.h b/src/projectile.h index 2488b28fb2525..01db0e8d09877 100644 --- a/src/projectile.h +++ b/src/projectile.h @@ -52,7 +52,7 @@ struct projectile { bool critical ) const; // pplies proj_effects to a creature that was hit but not damaged void apply_effects_nodamage( Creature &target, Creature *source, - const dealt_damage_instance &dealt_dam, bool soaked_through = false ) const; + const bodypart_id &bp_hit, bool soaked_through = false ) const; projectile(); projectile( const projectile & );