diff options
author | frosch <frosch@openttd.org> | 2010-06-05 13:32:42 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-06-05 13:32:42 +0000 |
commit | 9e53f1e004bf8e65f268b8854a6eb08229e3f2ed (patch) | |
tree | fa373b8ec4b6089ac9c1e51f168d44434df8c238 /src/network | |
parent | e852bf154f2af40b3cee1f67bef41a78c2056de5 (diff) | |
download | openttd-9e53f1e004bf8e65f268b8854a6eb08229e3f2ed.tar.xz |
(svn r19933) -Fix [FS#3804]: Keep _current_company and _local_company in sync during GUI operation.
Diffstat (limited to 'src/network')
-rw-r--r-- | src/network/network_command.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/network/network_command.cpp b/src/network/network_command.cpp index 71724b509..2869d8b8b 100644 --- a/src/network/network_command.cpp +++ b/src/network/network_command.cpp @@ -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; } /** |