From ebe99fd4935d54466730095e7a9f239181d5ba7b Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 11 Jan 2010 20:32:32 +0000 Subject: (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. --- src/ai/api/ai_object.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src/ai/api/ai_object.cpp') 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 */ -- cgit v1.2.3-54-g00ecf