summaryrefslogtreecommitdiff
path: root/src/network/network_server.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-02-04 18:06:19 +0100
committerglx22 <glx22@users.noreply.github.com>2019-02-04 21:08:36 +0100
commit8e7fe3973fc03561c828594ce3293c1ab3c15481 (patch)
tree14aece330e30ec3188f1f77f0ba0b138a8a86117 /src/network/network_server.cpp
parent33e3f4916173b4129cbbe60f94dae659a70edb83 (diff)
downloadopenttd-8e7fe3973fc03561c828594ce3293c1ab3c15481.tar.xz
Add: CompanyCtrlAction enum for CMD_COMPANY_CTRL actions
Diffstat (limited to 'src/network/network_server.cpp')
-rw-r--r--src/network/network_server.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 275b6200e..05fb27fc8 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -1675,7 +1675,7 @@ static void NetworkAutoCleanCompanies()
/* Is the company empty for autoclean_unprotected-months, and is there no protection? */
if (_settings_client.network.autoclean_unprotected != 0 && _network_company_states[c->index].months_empty > _settings_client.network.autoclean_unprotected && StrEmpty(_network_company_states[c->index].password)) {
/* Shut the company down */
- DoCommandP(0, 2 | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL);
+ DoCommandP(0, CCA_DELETE | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL);
IConsolePrintF(CC_DEFAULT, "Auto-cleaned company #%d with no password", c->index + 1);
}
/* Is the company empty for autoclean_protected-months, and there is a protection? */
@@ -1689,7 +1689,7 @@ static void NetworkAutoCleanCompanies()
/* Is the company empty for autoclean_novehicles-months, and has no vehicles? */
if (_settings_client.network.autoclean_novehicles != 0 && _network_company_states[c->index].months_empty > _settings_client.network.autoclean_novehicles && vehicles_in_company[c->index] == 0) {
/* Shut the company down */
- DoCommandP(0, 2 | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL);
+ DoCommandP(0, CCA_DELETE | c->index << 16, CRR_AUTOCLEAN, CMD_COMPANY_CTRL);
IConsolePrintF(CC_DEFAULT, "Auto-cleaned company #%d with no vehicles", c->index + 1);
}
} else {