diff --git a/src/common/kernel/battle.c b/src/common/kernel/battle.c index ad7077666..70ec2ccd6 100644 --- a/src/common/kernel/battle.c +++ b/src/common/kernel/battle.c @@ -1905,7 +1905,7 @@ attack(battle *b, troop ta, const att *a) ta.fighter->action_counter++; } - if (wp && hits(ta, td, wp)) { + if (hits(ta, td, wp)) { const char * d; if (wp == NULL) d = au->race->def_damage; else if (riding(ta)) d = wp->type->damage[1]; diff --git a/src/common/kernel/teleport.c b/src/common/kernel/teleport.c index 897dee455..7cc6e4bf7 100644 --- a/src/common/kernel/teleport.c +++ b/src/common/kernel/teleport.c @@ -150,7 +150,7 @@ create_teleport_plane(void) astral_plane = create_new_plane(1, "Astralraum", TE_CENTER_X-500, TE_CENTER_X+500, TE_CENTER_Y-500, TE_CENTER_Y+500, - PFL_NOCOORDS); + 0); } /* Regionsbereich aufbauen. */ diff --git a/src/common/kernel/unit.c b/src/common/kernel/unit.c index 361cea7d9..c431eb5e0 100644 --- a/src/common/kernel/unit.c +++ b/src/common/kernel/unit.c @@ -745,10 +745,11 @@ transfermen(unit * u, unit * u2, int n) /* TODO: Das ist schnarchlahm! und gehört ncht hierhin */ a = a_find(u2->attribs, &at_effect); while (a) { + attrib * an = a->nexttype; effect_data * olde = (effect_data*)a->data.v; int e = get_effect(u, olde->type); if (e!=0) change_effect(u2, olde->type, -e); - a = a->nexttype; + a = an; } } else if (r->land) diff --git a/src/common/modules/dungeon.c b/src/common/modules/dungeon.c index 1bda4aa94..28ea4da6a 100644 --- a/src/common/modules/dungeon.c +++ b/src/common/modules/dungeon.c @@ -127,7 +127,10 @@ make_dungeon(const dungeon * data) if (rn && rn->terrain==T_OCEAN) terraform(rn, T_FIREWALL); } if (size==0) break; - assert(r!=rnext); + if (r==rnext) { + /* error */ + break; + } r = rnext; n = (n+1) % 2; } @@ -161,7 +164,8 @@ void make_dungeongate(region * source, region * target, const struct dungeon * d) { building *bsource, *btarget; - + + if (source==NULL || target==NULL || d==NULL) return; bsource = new_building(bt_find("castle"), source, default_locale); set_string(&bsource->name, "Pforte zur Hölle"); bsource->size = 50; diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index d35f5f6de..1a43fe243 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -433,7 +433,7 @@ create_underworld(void) int x, y; region *r; attrib *a; - plane * hell = create_new_plane(-1, "Hölle", 100000, 100000, 100020, 100020, PFL_NOCOORDS); + plane * hell = create_new_plane(-1, "Hölle", 100000, 100000, 100020, 100020, PFL_NONE); for(x=0;x<=20;x++) { for(y=0;y<=20;y++) { @@ -2779,6 +2779,13 @@ heal_all(void) return 0; } +static void +fix_astralplane(void) +{ + plane * astralplane = getplanebyname("Astralraum"); + freset(astralplane, PFL_NOCOORDS); +} + void korrektur(void) { @@ -2786,6 +2793,7 @@ korrektur(void) setup_locales(); #endif + fix_astralplane(); fix_firewalls(); fix_gates(); #ifdef TEST_GM_COMMANDS