relations: Move relations state from struct natstr to relatstr
Relations state is relatively bulky: it's a big chunk of struct natstr, and adds 200 bytes per country to xdump nat. Relations change rarely. Rewriting it to disk on every nation update and retransmitting it in every xdump nat is wasteful. To avoid this waste, move relations state to its own struct relatstr. This is of course an xdump compatibility break. We're not maintaining xdump compatibility in this release. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
de24545963
commit
92693cba65
20 changed files with 223 additions and 155 deletions
|
@ -111,7 +111,6 @@ struct natstr {
|
|||
time_t nat_newstim; /* date news last read */
|
||||
time_t nat_annotim; /* date annos last read */
|
||||
float nat_level[4]; /* technology, etc */
|
||||
unsigned char nat_relate[MAXNOC]; /* enum relations */
|
||||
};
|
||||
|
||||
#define NAT_TLEV 0
|
||||
|
@ -140,6 +139,7 @@ struct relatstr {
|
|||
int rel_uid;
|
||||
time_t rel_timestamp;
|
||||
/* end of part matching struct empobj */
|
||||
unsigned char rel_relate[MAXNOC]; /* enum relations */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue