Fix sending money to companies in single-player mode

pull/21/merge
Jonathan G Rennison 7 years ago
parent e43f0dad21
commit 86bea16c60

@ -50,7 +50,7 @@
void CcGiveMoney(const CommandCost &result, TileIndex tile, uint32 p1, uint32 p2)
{
#ifdef ENABLE_NETWORK
if (result.Failed() || !_settings_game.economy.give_money) return;
if (result.Failed() || !_settings_game.economy.give_money || !_networking) return;
/* Inform the company of the action of one of its clients (controllers). */
char msg[64];

@ -261,7 +261,7 @@ CommandCost CmdGiveMoney(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
/* You can only transfer funds that is in excess of your loan */
if (c->money - c->current_loan < amount.GetCost() || amount.GetCost() < 0) return CMD_ERROR;
if (!_networking || !Company::IsValidID(dest_company)) return CMD_ERROR;
if (!Company::IsValidID(dest_company)) return CMD_ERROR;
if (flags & DC_EXEC) {
/* Add money to company */

Loading…
Cancel
Save