edit: Make edit l key 'L' preserve "no dist center"

Copying the sector copies its distribution center.  When the source
sector has none, the target sector is made to distribute to the
source.  Unexpected.  Zap the distribution center then.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2014-01-18 12:20:11 +01:00
parent 3c7d9da3ab
commit e604c6e737
2 changed files with 6 additions and 1 deletions

View file

@ -559,6 +559,11 @@ edit_sect(struct sctstr *sect, char *key, char *p)
newsect.sct_own);
report_god_gives("Sector ", xyas(newx, newy, sect->sct_own),
sect->sct_own);
if (sect->sct_x == sect->sct_dist_x
&& sect->sct_y == sect->sct_dist_y) {
sect->sct_dist_x = newx;
sect->sct_dist_y = newy;
}
sect->sct_x = newx;
sect->sct_y = newy;
sect->sct_coastal = newsect.sct_coastal;