Linkgraph: Pause game on load if a link graph join is immediately due

This commit is contained in:
Jonathan G Rennison
2019-02-25 18:43:38 +00:00
parent 7d57bd2621
commit b3a7a04cf2
2 changed files with 16 additions and 0 deletions

View File

@@ -336,6 +336,17 @@ void StateGameLoop_LinkGraphPauseControl()
} }
} }
/**
* Pause the game on load if we would do a join with the next link graph job, but it is still running, and it would not
* be caught by a call to StateGameLoop_LinkGraphPauseControl().
*/
void AfterLoad_LinkGraphPauseControl()
{
if (LinkGraphSchedule::instance.IsJoinWithUnfinishedJobDue()) {
_pause_mode |= PM_PAUSED_LINK_GRAPH;
}
}
/** /**
* Spawn or join a link graph job or compress a link graph if any link graph is * Spawn or join a link graph job or compress a link graph if any link graph is
* due to do so. * due to do so.

View File

@@ -3665,6 +3665,11 @@ bool AfterLoadGame()
default: break; default: break;
} }
if (!_networking || _network_server) {
extern void AfterLoad_LinkGraphPauseControl();
AfterLoad_LinkGraphPauseControl();
}
return true; return true;
} }