mob = roundavg(mob * 0.2);
if (mob > sect.sct_mobil)
mob = sect.sct_mobil;
- sect.sct_mobil -= (u_char)mob;
+ sect.sct_mobil -= mob;
pr("%3d conquered civilians converted in %s (%d)\n",
newuw, xyas(sect.sct_x, sect.sct_y, player->cnum), uw + newuw);
if (civ == 0) {
sect.sct_item[I_CIVIL] = civ - newmil;
pr("%3d enlisted in %s (%d)\n", newmil,
xyas(sect.sct_x, sect.sct_y, player->cnum), mil + newmil);
- if (sect.sct_mobil > 0) {
- sect.sct_mobil = (u_char)((float)sect.sct_mobil *
- (1.0 - (float)newmil / (float)civ));
- }
+ if (sect.sct_mobil > 0)
+ sect.sct_mobil *= 1.0 - (double)newmil / (double)civ;
putsect(§);
if (totalmil >= 10000) {
pr("Rioting in induction center interrupts enlistment\n");
return RET_SYN;
}
own = sect.sct_own;
- mob = (int)sect.sct_mobil;
+ mob = sect.sct_mobil;
if (vtype == I_CIVIL && sect.sct_oldown != own) {
pr("You can't explore with conquered populace!\n");
return RET_SYN;
if (mcost < 0) {
pr("\nExplore aborted");
getsect(start.sct_x, start.sct_y, §);
- sect.sct_mobil = (u_char)mob;
+ sect.sct_mobil = mob;
} else {
/* Charge mobility */
getsect(sect.sct_x, sect.sct_y, §);
n = sect.sct_mobil - mcost;
if (n < 0)
n = 0;
- sect.sct_mobil = (u_char)n;
+ sect.sct_mobil = n;
pr(", %d mob left in %s", sect.sct_mobil,
xyas(sect.sct_x, sect.sct_y, player->cnum));
putsect(§);
return RET_FAIL;
}
own = sect.sct_own;
- mob = (int)sect.sct_mobil;
+ mob = sect.sct_mobil;
if (!istest && vtype == I_CIVIL && sect.sct_oldown != own) {
pr("You can't move conquered populace!\n");
return RET_FAIL;
if (mcost < 0) {
pr("Move aborted\n");
getsect(x, y, §);
- sect.sct_mobil = (u_char)mob;
+ sect.sct_mobil = mob;
left = mob;
} else {
if (!istest) {
mob = 0;
} else
mob -= mcost;
- start.sct_mobil = (u_char)mob;
+ start.sct_mobil = mob;
left = start.sct_mobil;
putsect(&start);
}
struct nstr_sect nstr;
struct nstr_item ni;
int nshot;
- int mob_cost;
double m;
i_type item;
struct ichrstr *ip;
m = 0;
if (m > sect.sct_mobil)
m = sect.sct_mobil;
- mob_cost = roundavg(m);
- sect.sct_mobil -= (u_char)mob_cost;
+ sect.sct_mobil -= roundavg(m);
sect.sct_item[item] -= nshot;
pr("BANG!! (thump) %d %s shot in %s!\n",
nshot, ip->i_name, xyas(sect.sct_x, sect.sct_y, player->cnum));
n = 0;
if (n > sect.sct_mobil)
n = sect.sct_mobil;
- sect.sct_mobil -= (u_char)n;
+ sect.sct_mobil -= n;
if (actually_doit)
putsect(§);
n = 0;
if (n > sect.sct_mobil)
n = sect.sct_mobil;
- sect.sct_mobil -= (u_char)n;
+ sect.sct_mobil -= n;
if (actually_doit)
putsect(§);
n = 0;
if (n > sect.sct_mobil)
n = sect.sct_mobil;
- sect.sct_mobil -= (u_char)n;
+ sect.sct_mobil -= n;
if (actually_doit) {
putship(ship.shp_uid, &ship);
putsect(§);
n = 0;
if (n > sect.sct_mobil)
n = sect.sct_mobil;
- sect.sct_mobil -= (u_char)n;
+ sect.sct_mobil -= n;
if (actually_doit) {
putship(ship.shp_uid, &ship);