summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2009-01-12 17:40:13 +0000
committertruebrain <truebrain@openttd.org>2009-01-12 17:40:13 +0000
commitb7b29d96dee6eb15fa719b642d8aea5152a7314e (patch)
tree4217ac5d4c3316ea26c0dff8080d2c0e963fa5fd /src/ai
parente2d29460076995ed44f15bb2957fc4160d3378b4 (diff)
downloadopenttd-b7b29d96dee6eb15fa719b642d8aea5152a7314e.tar.xz
(svn r15033) -Fix (r15027): silent a warning when compiling without network
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_object.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ai/api/ai_object.cpp b/src/ai/api/ai_object.cpp
index 664c24ecc..55ca4dfed 100644
--- a/src/ai/api/ai_object.cpp
+++ b/src/ai/api/ai_object.cpp
@@ -202,7 +202,6 @@ bool AIObject::DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const c
return false;
}
- CompanyID old_company;
CommandCost res;
/* Set the default callback to return a true/false result of the DoCommand */
@@ -230,7 +229,7 @@ bool AIObject::DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const c
if (_networking) {
/* NetworkSend_Command needs _local_company to be set correctly, so
* adjust it, and put it back right after the function */
- old_company = _local_company;
+ CompanyID old_company = _local_company;
_local_company = _current_company;
::NetworkSend_Command(tile, p1, p2, cmd, CcAI, text);
_local_company = old_company;