(explore, ask_move_in_off): Compute weight as double, for consistency

with similar computations elsewhere.
This commit is contained in:
Markus Armbruster 2006-05-21 07:42:53 +00:00
parent 9b282753d6
commit d8dc8a3257
2 changed files with 2 additions and 2 deletions

View file

@ -132,7 +132,7 @@ explore(void)
if (amount <= 0) if (amount <= 0)
return RET_SYN; return RET_SYN;
weight = amount * ip->i_lbs; weight = (double)amount * ip->i_lbs;
/* remove commodities from source sector */ /* remove commodities from source sector */
getsect(x, y, &start); getsect(x, y, &start);
amt_src = start.sct_item[vtype]; amt_src = start.sct_item[vtype];

View file

@ -2468,7 +2468,7 @@ ask_move_in_off(struct combat *off, struct combat *def)
off->troops -= num_mil; off->troops -= num_mil;
put_combat(off); put_combat(off);
left = num_mil; left = num_mil;
weight = num_mil * ichr[I_MILIT].i_lbs; weight = (double)num_mil * ichr[I_MILIT].i_lbs;
if (opt_INTERDICT_ATT && chance(weight / 200.0)) { if (opt_INTERDICT_ATT && chance(weight / 200.0)) {
if (chance(weight / 100.0)) if (chance(weight / 100.0))
dam += dam +=