From 2e9e1d14ea5be8058646bdcb6a67d16b35a8deb8 Mon Sep 17 00:00:00 2001 From: jottyfan Date: Tue, 16 Jun 2015 21:57:16 +0200 Subject: [PATCH] Fix (r96): when a goal runs out untouched, rewards are no longer paid. --- company.nut | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/company.nut b/company.nut index 32d01f7..4d71963 100644 --- a/company.nut +++ b/company.nut @@ -165,6 +165,7 @@ function CompanyGoal::UpdateDelivered(mon, comp_id) } local goal_won_news; if (this.reward > 0) { + GSCompany.ChangeBankBalance(this.comp_id, goal.reward, 0); goal_won_news = GSText(GSText.STR_COMPANY_GOAL_REWARD_WON_NEWS, cargo.cid, this.wanted_amount, destination_string_news, this.reward); } else { goal_won_news = GSText(GSText.STR_COMPANY_GOAL_WON_NEWS, cargo.cid, this.wanted_amount, destination_string_news); @@ -528,7 +529,6 @@ function CompanyData::CheckAndFinishGoals() if (goal == null) continue; if (goal.CheckFinished()) { goal.FinalizeGoal(); - GSCompany.ChangeBankBalance(this.comp_id, goal.reward, 0); this.active_goals[num] = null; } }