mirror of https://github.com/OpenTTD/OpenTTD
(svn r15033) -Fix (r15027): silent a warning when compiling without network
parent
e2d2946007
commit
b7b29d96de
|
@ -202,7 +202,6 @@ bool AIObject::DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const c
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
CompanyID old_company;
|
|
||||||
CommandCost res;
|
CommandCost res;
|
||||||
|
|
||||||
/* Set the default callback to return a true/false result of the DoCommand */
|
/* 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) {
|
if (_networking) {
|
||||||
/* NetworkSend_Command needs _local_company to be set correctly, so
|
/* NetworkSend_Command needs _local_company to be set correctly, so
|
||||||
* adjust it, and put it back right after the function */
|
* adjust it, and put it back right after the function */
|
||||||
old_company = _local_company;
|
CompanyID old_company = _local_company;
|
||||||
_local_company = _current_company;
|
_local_company = _current_company;
|
||||||
::NetworkSend_Command(tile, p1, p2, cmd, CcAI, text);
|
::NetworkSend_Command(tile, p1, p2, cmd, CcAI, text);
|
||||||
_local_company = old_company;
|
_local_company = old_company;
|
||||||
|
|
Loading…
Reference in New Issue