summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-23 23:29:59 +0000
committertruebrain <truebrain@openttd.org>2011-12-23 23:29:59 +0000
commitd6e88a7cab45928aad1bd9d8f958854c571593a8 (patch)
treeca62b73e33e4df2da101c45aab191c6bc8181e1f
parent1ceef81cd309da56151215a68a3a88e22e803abb (diff)
downloadopenttd-d6e88a7cab45928aad1bd9d8f958854c571593a8.tar.xz
(svn r23664) -Fix: adding goals with a company were still added for all companies. Tnx to Zuu for reporting (although cryptic :D)
-rw-r--r--src/goal.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/goal.cpp b/src/goal.cpp
index 91ba6d288..b6eabcdfe 100644
--- a/src/goal.cpp
+++ b/src/goal.cpp
@@ -80,6 +80,8 @@ CommandCost CmdCreateGoal(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
default: return CMD_ERROR;
}
+ if (company != INVALID_OWNER && company != _local_company) return CommandCost();
+
if (flags & DC_EXEC) {
Goal *g = new Goal();
g->type = type;