From 8da88626d58de0299d8f33ad9069bb273120eae4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 23 Sep 2006 10:37:55 +0000 Subject: [PATCH] (produce_sect, finish_sects): Move stop order expiry to end of update, so that stopped sectors don't repair units. The update sequence masked this bug until its change in src/lib/update/main.c rev. 1.25, but use of budget priorities (gone since rev. 1.24) could unmask it. --- src/lib/update/finish.c | 2 ++ src/lib/update/sect.c | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/lib/update/finish.c b/src/lib/update/finish.c index d5d8c27c..28aab7b9 100644 --- a/src/lib/update/finish.c +++ b/src/lib/update/finish.c @@ -162,6 +162,8 @@ finish_sects(int etu) if (infptr->path) free(infptr->path); #endif /* SAVE_FINISH_PATHS */ + + sp->sct_off = 0; } logerror("done importing\n"); diff --git a/src/lib/update/sect.c b/src/lib/update/sect.c index f0105ac8..ea7238b2 100644 --- a/src/lib/update/sect.c +++ b/src/lib/update/sect.c @@ -314,11 +314,8 @@ produce_sect(int natnum, int etu, int *bp, long p_sect[][2]) bp_disable_cachepath(); bp_clear_cachepath(); - if (sp->sct_off || np->nat_money < 0) { - if (!player->simulation) - sp->sct_off = 0; + if (sp->sct_off || np->nat_money < 0) continue; - } neweff = sp->sct_effic; amount = 0;