Narrow struct sctstr member sct_mobil to char
To bring it in line with unit mobility.
This commit is contained in:
parent
ca2dba33f0
commit
aa659c7754
4 changed files with 5 additions and 5 deletions
|
@ -55,7 +55,7 @@ struct sctstr {
|
||||||
signed char sct_type; /* sector type */
|
signed char sct_type; /* sector type */
|
||||||
/* end of part matching struct empobj */
|
/* end of part matching struct empobj */
|
||||||
signed char sct_effic; /* 0% to 100% */
|
signed char sct_effic; /* 0% to 100% */
|
||||||
short sct_mobil; /* mobility units */
|
signed char sct_mobil; /* mobility units */
|
||||||
unsigned char sct_loyal; /* updates until civilans "converted" */
|
unsigned char sct_loyal; /* updates until civilans "converted" */
|
||||||
unsigned char sct_terr; /* territory 0 id # of sector */
|
unsigned char sct_terr; /* territory 0 id # of sector */
|
||||||
unsigned char sct_terr1; /* territory 1 id # of sector */
|
unsigned char sct_terr1; /* territory 1 id # of sector */
|
||||||
|
|
|
@ -235,7 +235,7 @@ setsector(void)
|
||||||
current = 127;
|
current = 127;
|
||||||
pr("Mobility in %s changed to %d.\n",
|
pr("Mobility in %s changed to %d.\n",
|
||||||
xyas(sect.sct_x, sect.sct_y, player->cnum), current);
|
xyas(sect.sct_x, sect.sct_y, player->cnum), current);
|
||||||
sect.sct_mobil = (short)current;
|
sect.sct_mobil = current;
|
||||||
putsect(§);
|
putsect(§);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -140,7 +140,7 @@ struct castr sect_ca[] = {
|
||||||
{"yloc", fldoff(sct_y), NSC_YCOORD, 0, NULL, EF_BAD, NSC_CONST},
|
{"yloc", fldoff(sct_y), NSC_YCOORD, 0, NULL, EF_BAD, NSC_CONST},
|
||||||
{"des", fldoff(sct_type), NSC_CHAR, 0, NULL, EF_SECTOR_CHR, 0},
|
{"des", fldoff(sct_type), NSC_CHAR, 0, NULL, EF_SECTOR_CHR, 0},
|
||||||
{"effic", fldoff(sct_effic), NSC_CHAR, 0, NULL, EF_BAD, 0},
|
{"effic", fldoff(sct_effic), NSC_CHAR, 0, NULL, EF_BAD, 0},
|
||||||
{"mobil", fldoff(sct_mobil), NSC_SHORT, 0, NULL, EF_BAD, 0},
|
{"mobil", fldoff(sct_mobil), NSC_CHAR, 0, NULL, EF_BAD, 0},
|
||||||
{"loyal", fldoff(sct_loyal), NSC_UCHAR, 0, NULL, EF_BAD, NSC_DEITY},
|
{"loyal", fldoff(sct_loyal), NSC_UCHAR, 0, NULL, EF_BAD, NSC_DEITY},
|
||||||
{"terr", 0, NSC_UCHAR, 0, nsc_sct_terr, EF_BAD, NSC_EXTRA},
|
{"terr", 0, NSC_UCHAR, 0, nsc_sct_terr, EF_BAD, NSC_EXTRA},
|
||||||
{"terr0", fldoff(sct_terr), NSC_UCHAR, 0, NULL, EF_BAD, 0},
|
{"terr0", fldoff(sct_terr), NSC_UCHAR, 0, NULL, EF_BAD, 0},
|
||||||
|
|
|
@ -353,12 +353,12 @@ put_combat(struct combat *com)
|
||||||
if ((com->mob - com->mobcost) < -127)
|
if ((com->mob - com->mobcost) < -127)
|
||||||
sect.sct_mobil = -127;
|
sect.sct_mobil = -127;
|
||||||
else
|
else
|
||||||
sect.sct_mobil = (short)(com->mob - com->mobcost);
|
sect.sct_mobil = com->mob - com->mobcost;
|
||||||
} else {
|
} else {
|
||||||
if ((com->mob - com->mobcost) < 0)
|
if ((com->mob - com->mobcost) < 0)
|
||||||
sect.sct_mobil = 0;
|
sect.sct_mobil = 0;
|
||||||
else
|
else
|
||||||
sect.sct_mobil = (short)(com->mob - com->mobcost);
|
sect.sct_mobil = com->mob - com->mobcost;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sect.sct_own = com->own;
|
sect.sct_own = com->own;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue