torpedo mission: Print rounded, not truncated hit chance
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
bfea5a2cf4
commit
89b76644b2
2 changed files with 2 additions and 3 deletions
|
@ -161,7 +161,7 @@ torp(void)
|
|||
range = mapdist(sub.shp_x, sub.shp_y, vship.shp_x, vship.shp_y);
|
||||
hitchance = shp_torp_hitchance(&sub, range);
|
||||
if (range <= erange) {
|
||||
pr("Hitchance = %d%%\n", (int)(hitchance * 100));
|
||||
pr("Hitchance = %.0f%%\n", hitchance * 100);
|
||||
}
|
||||
if (range > erange)
|
||||
pr("Out of range\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue