Store uids as int to support more sectors and units
Before, they were stored as short. Wider uids use more space, but the
next commit will recover it by narrowing other members.
The use of short has always limited the number of ships, planes, land
units and nukes to SHRT_MAX (commonly 32768). Only the most extreme
games ever came close.
Commit 49780e2c
(v4.3.12) added struct sctstr member sct_uid to make
struct empobj member uid work for sectors. This made the limit apply
to sectors as well. We've had games with more than 32768 sectors.
This commit is contained in:
parent
18148f03fa
commit
ba2044be18
18 changed files with 50 additions and 50 deletions
|
@ -64,7 +64,7 @@
|
|||
struct shpstr {
|
||||
/* initial part must match struct empobj */
|
||||
short ef_type;
|
||||
short shp_uid; /* unit id (ship #) */
|
||||
int shp_uid; /* unit it (ship #) */
|
||||
unsigned shp_seqno;
|
||||
time_t shp_timestamp; /* Last time this ship was touched. */
|
||||
natid shp_own; /* owner's country num */
|
||||
|
@ -93,7 +93,7 @@ struct shpstr {
|
|||
short shp_access; /* Last tick mob was updated (MOB_ACCESS) */
|
||||
unsigned char shp_mobquota; /* mobility quota */
|
||||
char shp_path[MAXSHPPATH];
|
||||
short shp_follow;
|
||||
int shp_follow;
|
||||
char shp_name[MAXSHPNAMLEN]; /* name set with the "name" command */
|
||||
coord shp_orig_x;
|
||||
coord shp_orig_y; /* Where we were built */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue