Skip to content

Commit

Permalink
Clang happy?
Browse files Browse the repository at this point in the history
  • Loading branch information
Venera3 committed Nov 3, 2021
1 parent c201ac8 commit 3888cad
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 4 deletions.
17 changes: 16 additions & 1 deletion src/creature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,11 @@ void Creature::deal_damage_handle_type( const effect_source &source, const damag
case damage_type::STAB:
case damage_type::BULLET:
// these are bleed inducing damage types
make_bleed( source, bp, 1_minutes * rng( 1, adjusted_damage ) );
if( !is_monster() ) {
make_bleed( source, bp, 1_minutes * rng( 1, adjusted_damage ) );
} else {
make_bleed( source, 1_minutes * rng( 1, adjusted_damage ) );
}

default:
break;
Expand All @@ -1208,6 +1212,17 @@ void Creature::deal_damage_handle_type( const effect_source &source, const damag
pain += roll_remainder( adjusted_damage / div );
}

void Creature::make_bleed( const effect_source &source, const bodypart_id &bp,
time_duration duration,
int intensity, bool permanent, bool force, bool defferred )
{
}

void Creature::make_bleed( const effect_source &source, time_duration duration, int intensity,
bool permanent, bool force, bool defferred )
{
}

void Creature::heal_bp( bodypart_id /* bp */, int /* dam */ )
{
}
Expand Down
5 changes: 4 additions & 1 deletion src/creature.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,10 @@ class Creature : public viewer

// Pass handling bleed to creature/character
virtual void make_bleed( const effect_source &source, const bodypart_id &bp, time_duration duration,
int intensity = 1, bool permanent = false, bool force = false, bool defferred = false ) = 0;
int intensity = 1, bool permanent = false, bool force = false, bool defferred = false );

virtual void make_bleed( const effect_source &source, time_duration duration,
int intensity = 1, bool permanent = false, bool force = false, bool defferred = false );

// directly decrements the damage. ONLY handles damage, doesn't
// increase pain, apply effects, etc
Expand Down
2 changes: 1 addition & 1 deletion src/monster.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1513,7 +1513,7 @@ bool monster::is_immune_damage( const damage_type dt ) const
}
}

void monster::make_bleed( const effect_source &source, const bodypart_id &bp,
void monster::make_bleed( const effect_source &source,
time_duration duration, int intensity, bool permanent, bool force, bool defferred )
{
if( type->bleed_rate == 0 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/monster.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ class monster : public Creature
bool is_immune_effect( const efftype_id & ) const override;
bool is_immune_damage( damage_type ) const override;

void make_bleed( const effect_source &source, const bodypart_id &bp, time_duration duration,
void make_bleed( const effect_source &source, time_duration duration,
int intensity = 1, bool permanent = false, bool force = false, bool defferred = false ) override;

const weakpoint *absorb_hit( const weakpoint_attack &attack, const bodypart_id &bp,
Expand Down

0 comments on commit 3888cad

Please sign in to comment.