diff options
Diffstat (limited to 'src/ai/api/ai_object.cpp')
-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 */ |