From 4e661c91ceb88fa5a706d235f716d3962c32a70a Mon Sep 17 00:00:00 2001 From: Alberth Date: Wed, 31 Dec 2014 12:58:27 +0100 Subject: [PATCH] Fix: Sharing goals between companies is a bad idea. Closes #7367 --- company.nut | 3 ++- main.nut | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/company.nut b/company.nut index d40356b..e1ae8ca 100644 --- a/company.nut +++ b/company.nut @@ -110,9 +110,10 @@ function CompanyGoal::FinalizeGoal() class CompanyData { comp_id = null; - active_goals = {}; + active_goals = null; constructor(comp_id) { + this.active_goals = {}; this.comp_id = comp_id; for (local num = 0; num < 5; num += 1) this.active_goals[num] <- null; diff --git a/main.nut b/main.nut index 2950487..515b0fc 100644 --- a/main.nut +++ b/main.nut @@ -231,6 +231,7 @@ function BusyBeeClass::Start() if (this.companies[cid] == null) { this.companies[cid] = CompanyData(cid); GSLog.Info("Created company " + cid); + new_goal_timeout = 0; // Force creating of new goals. } } }