From 25dece0a3d6e7f964734219f9ec2012416a9ef95 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 23 Sep 2006 10:47:58 +0000 Subject: [PATCH] (produce_sect): Game state changes may be changed only if player->simulation. Fix a missing guard. Existing callers should not need it. --- src/lib/update/sect.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/lib/update/sect.c b/src/lib/update/sect.c index ea7238b2..b27c1874 100644 --- a/src/lib/update/sect.c +++ b/src/lib/update/sect.c @@ -291,14 +291,16 @@ produce_sect(int natnum, int etu, int *bp, long p_sect[][2]) vec = sp->sct_item; /* If everybody is dead, the sector reverts to unowned. - * This is also checked at the end of the production in - * they all starved or were plagued off. + * This is also checked at the end of the production in + * they all starved or were plagued off. */ if (vec[I_CIVIL] == 0 && vec[I_MILIT] == 0 && !has_units(sp->sct_x, sp->sct_y, sp->sct_own, 0)) { - makelost(EF_SECTOR, sp->sct_own, 0, sp->sct_x, sp->sct_y); - sp->sct_own = 0; - sp->sct_oldown = 0; + if (!player->simulation) { + makelost(EF_SECTOR, sp->sct_own, 0, sp->sct_x, sp->sct_y); + sp->sct_own = 0; + sp->sct_oldown = 0; + } continue; }