changeset 18816:64f2407c01a7 draft

(svn r23664) -Fix: adding goals with a company were still added for all companies. Tnx to Zuu for reporting (although cryptic :D)
author truebrain <truebrain@openttd.org>
date Fri, 23 Dec 2011 23:29:59 +0000
parents 858f8026d464
children bff544da26a2
files src/goal.cpp
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/goal.cpp
+++ b/src/goal.cpp
@@ -80,6 +80,8 @@
 		default: return CMD_ERROR;
 	}
 
+	if (company != INVALID_OWNER && company != _local_company) return CommandCost();
+
 	if (flags & DC_EXEC) {
 		Goal *g = new Goal();
 		g->type = type;