diff options
author | rubidium <rubidium@openttd.org> | 2010-01-11 20:32:32 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-01-11 20:32:32 +0000 |
commit | ebe99fd4935d54466730095e7a9f239181d5ba7b (patch) | |
tree | adaacb8e6827eaad9ad49c81905a04dca0bf8c21 /src/ai/api | |
parent | 3e5a87a52cc8355a2a5c2831c60643bf30d41a3a (diff) | |
download | openttd-ebe99fd4935d54466730095e7a9f239181d5ba7b.tar.xz |
(svn r18784) -Codechange: make NetworkSend_Command accept a company instead of using _local_company to pass that information, with the whole mess when you don't want the company to be _local_company.
Diffstat (limited to 'src/ai/api')
-rw-r--r-- | src/ai/api/ai_object.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/ai/api/ai_object.cpp b/src/ai/api/ai_object.cpp index c9abc9ea4..43103afb7 100644 --- a/src/ai/api/ai_object.cpp +++ b/src/ai/api/ai_object.cpp @@ -230,12 +230,7 @@ bool AIObject::DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const c #ifdef ENABLE_NETWORK /* Send the command */ if (_networking) { - /* NetworkSend_Command needs _local_company to be set correctly, so - * adjust it, and put it back right after the function */ - CompanyID old_company = _local_company; - _local_company = _current_company; - ::NetworkSend_Command(tile, p1, p2, cmd, CcAI, text); - _local_company = old_company; + ::NetworkSend_Command(tile, p1, p2, cmd, CcAI, text, _current_company); SetLastCost(res.GetCost()); /* Suspend the AI till the command is really executed */ |