Skip to content

Commit be71f21

Browse files
committed
print correct ammo damage in wielding menu
1 parent ec195b2 commit be71f21

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/game_inventory.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,13 @@ class weapon_inventory_preset: public inventory_selector_preset
19181918
);
19191919
}
19201920
}
1921-
const int ammo_damage = damage.total_damage();
1921+
1922+
int ammo_damage;
1923+
if( loc->barrel_length().value() > 0 ) {
1924+
ammo_damage = damage.di_considering_length( loc->barrel_length() ).total_damage();
1925+
} else {
1926+
ammo_damage = damage.total_damage();
1927+
}
19221928

19231929
return string_format( "%s<color_light_gray>+</color>%s <color_light_gray>=</color> %s",
19241930
get_damage_string( basic_damage, true ),

0 commit comments

Comments
 (0)