Pause the game instead of blocking when link graph jobs lag.

Check if the job is still running one date fract tick before it
is due to join and if so pause the game until its done.
This avoids the main thread being blocked on a thread join.
Show if pause is due to link graph job in status bar, update network
messages.
This does not apply for network clients.
This commit is contained in:
Jonathan G Rennison
2015-09-03 18:36:30 +01:00
parent 5108a71240
commit c6854afcef
10 changed files with 86 additions and 4 deletions

View File

@@ -152,6 +152,7 @@ CommandCost CmdPause(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2,
case PM_PAUSED_ERROR:
case PM_PAUSED_NORMAL:
case PM_PAUSED_GAME_SCRIPT:
case PM_PAUSED_LINK_GRAPH:
break;
#ifdef ENABLE_NETWORK