(sct_pstage, sct_ptime, shp_pstage, shp_ptime, lnd_pstage, lnd_ptime):

Use `short' instead of `unsigned short'.  With variables, plague stage
and time were stored unsigned and used signed, which worked.  Removal
of variables dropped the conversion to signed, which broke
plague_people() (plague.c rev. 1.6): stage didn't progress correctly
due to catastrophic underflow of time.
This commit is contained in:
Ron Koenderink 2004-12-12 19:39:35 +00:00
parent 03c96f90d8
commit 4a6346b0df
8 changed files with 17 additions and 17 deletions

View file

@ -103,8 +103,8 @@ struct castr sect_ca[] = {
NSC_IVEC(fldoff(sctstr, sct_dist), "_dist"),
NSC_IVEC(fldoff(sctstr, sct_del), "_del"),
{NSC_SHORT, NSC_DEITY, 0, fldoff(sctstr, sct_mines), "mines"},
{NSC_USHORT, NSC_DEITY, 0, fldoff(sctstr, sct_pstage), "pstage"},
{NSC_USHORT, NSC_DEITY, 0, fldoff(sctstr, sct_ptime), "ptime"},
{NSC_SHORT, NSC_DEITY, 0, fldoff(sctstr, sct_pstage), "pstage"},
{NSC_SHORT, NSC_DEITY, 0, fldoff(sctstr, sct_ptime), "ptime"},
{NSC_UCHAR, NSC_DEITY, 0, fldoff(sctstr, sct_che), "che"},
{NSC_NATID, NSC_DEITY, 0, fldoff(sctstr, sct_che_target), "che_target"},
{NSC_USHORT, 0, 0, fldoff(sctstr, sct_fallout), "fallout"},
@ -146,8 +146,8 @@ struct castr ship_ca[] = {
{NSC_SHORT, 0, TMAX, fldoff(shpstr, shp_lend), "amtend"},
{NSC_UCHAR, 0, 0, fldoff(shpstr, shp_autonav), "autonav"},
NSC_IVEC(fldoff(shpstr, shp_item), ""),
{NSC_USHORT, NSC_DEITY, 0, fldoff(shpstr, shp_pstage), "pstage"},
{NSC_USHORT, NSC_DEITY, 0, fldoff(shpstr, shp_ptime), "ptime"},
{NSC_SHORT, NSC_DEITY, 0, fldoff(shpstr, shp_pstage), "pstage"},
{NSC_SHORT, NSC_DEITY, 0, fldoff(shpstr, shp_ptime), "ptime"},
{NSC_TIME, 0, 0, fldoff(shpstr, shp_access), "access"},
{NSC_TIME, NSC_EXTRA, 0, fldoff(shpstr, shp_timestamp), "timestamp"},
{NSC_UCHAR, 0, 0, fldoff(shpstr, shp_mobquota), "mobquota"},
@ -195,8 +195,8 @@ struct castr land_ca[] = {
{NSC_STRINGY, 0, RET_LEN, fldoff(lndstr, lnd_rpath), "rpath"},
{NSC_UCHAR, 0, 0, fldoff(lndstr, lnd_rad_max), "react"},
NSC_IVEC(fldoff(lndstr, lnd_item), ""),
{NSC_USHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_pstage), "pstage"},
{NSC_USHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_ptime), "ptime"},
{NSC_SHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_pstage), "pstage"},
{NSC_SHORT, NSC_DEITY, 0, fldoff(lndstr, lnd_ptime), "ptime"},
{NSC_SHORT, 0, 0, fldoff(lndstr, lnd_land), "land"},
{NSC_UCHAR, NSC_EXTRA, 0, fldoff(lndstr, lnd_nland), "nland"},
{NSC_TIME, 0, 0, fldoff(lndstr, lnd_access), "access"},