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:
Markus Armbruster 2009-12-30 14:07:51 +01:00
parent 18148f03fa
commit ba2044be18
18 changed files with 50 additions and 50 deletions

View file

@ -45,7 +45,7 @@
struct sctstr {
/* initial part must match struct empobj */
short ef_type;
short sct_uid; /* equals XYOFFSET(sct_x, sct_y) */
int sct_uid; /* equals XYOFFSET(sct_x, sct_y) */
unsigned sct_seqno;
time_t sct_timestamp; /* Last time this sector was written to */
natid sct_own; /* owner's country num */