Skip to content

Commit

Permalink
reordering the branches
Browse files Browse the repository at this point in the history
  • Loading branch information
osuphobia authored Jan 4, 2025
1 parent 1b0c5fb commit c0d220a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/ballistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -235,11 +235,12 @@ dealt_projectile_attack projectile_attack( const projectile &proj_arg,
double target_size;
if( target_critter != nullptr ) {
const monster *mon = target_critter->as_monster();
if( !mon || !proj_arg.proj_effects.count( ammo_effect_WIDE ) ) {
target_size = target_critter->ranged_target_size();
} else {
if( mon && proj_arg.proj_effects.count( ammo_effect_WIDE ) ) {
// ammo with ammo_effect_WIDE ignores mon_flag_HARDTOSHOOT
target_size = occupied_tile_fraction( mon->get_size() );
} else {
target_size = target_critter->ranged_target_size();
}
}
} else {

Check failure on line 245 in src/ballistics.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

non-void function does not return a value [-Werror,-Wreturn-type]

Check failure on line 245 in src/ballistics.cpp

View workflow job for this annotation

GitHub Actions / Basic Build and Test (Clang 10, Ubuntu, Curses)

expected unqualified-id
target_size = here.ranged_target_size( target_arg );
Expand Down

0 comments on commit c0d220a

Please sign in to comment.