Veraendertes Verhalten des Mappers: bei Weltenden werden Feuerwaende

eingezogen, wenn sie 10 Wochen alt sind. Verhindert, dass alte und neue
Welten zusammenstossen.
This commit is contained in:
Enno Rehling 2003-08-13 21:41:36 +00:00
parent f02d8abf9a
commit 777da86869
1 changed files with 8 additions and 21 deletions

View File

@ -1561,31 +1561,18 @@ void
frame_regions(void)
{
region * r = regions;
int lastage=r->age;
while (r!=0) {
if (r->age<20) {
if (r->age+1<lastage) r->age = lastage;
}
lastage=r->age;
r = r->next;
}
r = regions;
while (r!=0) {
if (r->terrain==T_OCEAN) {
for (r=regions;r;r=r->next) if (r->age>10 && r->terrain!=T_FIREWALL) {
direction_t d;
for (d=0;d!=6;++d) {
for (d=0;d!=MAXDIRECTIONS;++d) {
region * rn = rconnect(r, d);
if (rn!=0 && rn->terrain==T_OCEAN) {
if ((rn->age+5)*2<r->age && r->age<50) {
if (rn->units) log_printf("Cannot terraform %s\n", regionname(rn, NULL));
else terraform(rn, T_FIREWALL);
if (rn==NULL) {
rn = new_region(r->x+delta_x[d], r->y+delta_y[d]);
terraform(rn, T_FIREWALL);
rn->age=r->age;
}
}
}
}
r=r->next;
}
}
int
main(int argc, char *argv[])