1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 13:39:09 +00:00

(svn r19933) -Fix [FS#3804]: Keep _current_company and _local_company in sync during GUI operation.

This commit is contained in:
frosch
2010-06-05 13:32:42 +00:00
parent e852bf154f
commit 9e53f1e004
7 changed files with 54 additions and 39 deletions

View File

@@ -153,6 +153,8 @@ void NetworkSyncCommandQueue(NetworkClientSocket *cs)
*/
void NetworkExecuteLocalCommandQueue()
{
assert(_current_company == _local_company);
while (_local_command_queue != NULL) {
/* The queue is always in order, which means
@@ -175,6 +177,9 @@ void NetworkExecuteLocalCommandQueue()
_local_command_queue = _local_command_queue->next;
free(cp);
}
/* Local company may have changed, so we should not restore the old value */
_current_company = _local_company;
}
/**