Link graph: Store last compression in scaled date ticks
Higher accuracy than using dates at high day legnths
This commit is contained in:
@@ -913,6 +913,12 @@ bool AfterLoadGame()
|
||||
_settings_game.linkgraph.recalc_time *= SECONDS_PER_DAY;
|
||||
}
|
||||
|
||||
/* Convert link graph last compression from date to scaled ticks. */
|
||||
if (SlXvIsFeatureMissing(XSLFI_LINKGRAPH_DAY_SCALE, 4)) {
|
||||
extern void LinkGraphFixupLastCompressionAfterLoad();
|
||||
LinkGraphFixupLastCompressionAfterLoad();
|
||||
}
|
||||
|
||||
/* Load the sprites */
|
||||
GfxLoadSprites();
|
||||
LoadStringWidthTable();
|
||||
|
||||
@@ -125,7 +125,7 @@ public:
|
||||
SaveLoadTable GetLinkGraphDesc()
|
||||
{
|
||||
static const SaveLoad link_graph_desc[] = {
|
||||
SLE_VAR(LinkGraph, last_compression, SLE_INT32),
|
||||
SLE_VAR(LinkGraph, last_compression, SLE_VAR_I64 | SLE_FILE_I32),
|
||||
SLEG_CONDVAR("num_nodes", _num_nodes, SLE_UINT16, SL_MIN_VERSION, SLV_SAVELOAD_LIST_LENGTH),
|
||||
SLE_VAR(LinkGraph, cargo, SLE_UINT8),
|
||||
SLEG_STRUCTLIST("nodes", SlLinkgraphNode),
|
||||
|
||||
Reference in New Issue
Block a user