From 7a69ac541b876bce6ad822f9e0a43cd2202f80b9 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 13 Jun 2005 21:26:52 +0000 Subject: [PATCH] =?UTF-8?q?http://eressea.upb.de/mantis/view.php=3Fid=3D55?= =?UTF-8?q?6=20Feuerw=C3=A4nde=20im=20Astralraum?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Werden durch Astralblock ersetzt. Ausserdem wird aus dem mapper heraus wieder eine Grenze von Feuerwänden um ältere Gebiete herum gezogen. Issue: 556 --- src/eressea/korrektur.c | 36 ++++++++++++++++++++++++++++++++++++ src/mapper/mapper.c | 18 ------------------ 2 files changed, 36 insertions(+), 18 deletions(-) diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index 8c0a9c313..a0ec51a73 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -747,6 +747,28 @@ fix_gates(void) } } +static void +frame_regions(void) +{ + region * r = regions; + for (r=regions;r;r=r->next) { + direction_t d; + + if (r->age<10) continue; + if (r->planep) continue; + if (r->terrain==T_FIREWALL) continue; + + for (d=0;d!=MAXDIRECTIONS;++d) { + region * rn = rconnect(r, d); + if (rn==NULL) { + rn = new_region(r->x+delta_x[d], r->y+delta_y[d]); + terraform(rn, T_FIREWALL); + rn->age=r->age; + } + } + } +} + static int fix_astralplane(void) { @@ -1037,6 +1059,18 @@ fix_attribflags(void) return 0; } +static int +fix_astral_firewalls(void) +{ + region * r; + for (r = regions; r; r=r->next) { + if (r->planep==astral_plane && r->terrain==T_FIREWALL) { + terraform(r, T_ASTRALB); + } + } + return 0; +} + static int fix_chaosgates(void) { @@ -1077,6 +1111,8 @@ korrektur(void) do_once("chgt", fix_chaosgates()); do_once("atri", fix_attribflags()); + do_once("asfi", fix_astral_firewalls()); + frame_regions(); fix_astralplane(); fix_firewalls(); fix_gates(); diff --git a/src/mapper/mapper.c b/src/mapper/mapper.c index 940e97015..ddda48ccc 100644 --- a/src/mapper/mapper.c +++ b/src/mapper/mapper.c @@ -1555,23 +1555,6 @@ log_newstuff(void) } } -void -frame_regions(void) -{ - region * r = regions; - for (r=regions;r;r=r->next) if (r->age>10 && r->terrain!=T_FIREWALL) { - direction_t d; - for (d=0;d!=MAXDIRECTIONS;++d) { - region * rn = rconnect(r, d); - if (rn==NULL) { - rn = new_region(r->x+delta_x[d], r->y+delta_y[d]); - terraform(rn, T_FIREWALL); - rn->age=r->age; - } - } - } -} - int main(int argc, char *argv[]) { @@ -1731,7 +1714,6 @@ main(int argc, char *argv[]) setminmax(); srand(time((time_t *) NULL)); - frame_regions(); if (autoseeding) { runautoseed(); remove_empty_units();