diff --git a/src/economy.test.c b/src/economy.test.c index 90a4bd260..1a40c03db 100644 --- a/src/economy.test.c +++ b/src/economy.test.c @@ -487,6 +487,7 @@ static void test_recruit_insect(CuTest *tc) { test_setup(); test_create_calendar(); + test_create_terrain("desert", -1); f = test_create_faction(test_create_race("insect")); u = test_create_unit(f, test_create_region(0, 0, NULL)); u->thisorder = create_order(K_RECRUIT, f->locale, "%d", 1); diff --git a/src/gmtool.c b/src/gmtool.c index fdbfd3faa..c2193bd32 100644 --- a/src/gmtool.c +++ b/src/gmtool.c @@ -932,20 +932,10 @@ static void seed_player(state *st, const newfaction *player) { pnormalize(&nx, &ny, st->cursor.pl); r = findregion(nx, ny); if (r) { - const char *at = strchr(player->email, '@'); faction *f; addplayer(r, f = addfaction(player->email, player->password, player->race, player->lang, player->subscription)); - if (at) { - char fname[64]; - size_t len = at - player->email; - if (len>4 && lenemail, len); - fname[len]=0; - faction_setname(f, fname); - } - } } } } diff --git a/src/races/races.c b/src/races/races.c index 120a15dd9..44ca5d95e 100644 --- a/src/races/races.c +++ b/src/races/races.c @@ -30,7 +30,6 @@ void age_firedragon(struct unit *u); void age_dragon(struct unit *u); -void age_undead(struct unit *u); void age_skeleton(struct unit *u); void age_zombie(struct unit *u); void age_ghoul(struct unit *u); @@ -81,7 +80,6 @@ void equip_newunits(struct unit *u) void register_races(void) { /* function age for race->age() */ - register_function((pf_generic)age_undead, "age_undead"); register_function((pf_generic)age_skeleton, "age_skeleton"); register_function((pf_generic)age_zombie, "age_zombie"); register_function((pf_generic)age_ghoul, "age_ghoul"); diff --git a/src/races/zombies.c b/src/races/zombies.c index de3d81972..3c880d819 100644 --- a/src/races/zombies.c +++ b/src/races/zombies.c @@ -40,29 +40,6 @@ void make_undead_unit(unit * u) u->flags |= UFL_ISNEW; } -void age_undead(unit * u) -{ - region *r = u->region; - - /* untote, die einer partei angehoeren, koennen sich - * absplitten, anstatt sich zu vermehren. monster - * untote vermehren sich nur noch */ - - if (u->number > UNDEAD_MIN && !is_monsters(u->faction) - && rng_int() % 100 < UNDEAD_BREAKUP) { - int m, n = 0; - unit *u2; - - for (m = u->number; m; m--) { - if (rng_int() % 100 < UNDEAD_BREAKUP_FRACTION) - ++n; - } - u2 = create_unit(r, get_monsters(), 0, get_race(RC_UNDEAD), 0, NULL, u); - make_undead_unit(u2); - transfermen(u, u2, u->number - n); - } -} - void age_skeleton(unit * u) { if (is_monsters(u->faction) && rng_int() % 100 < age_chance(u->age, 27, 1)) { diff --git a/src/tests.c b/src/tests.c index 4ee38d195..6395b4fcb 100644 --- a/src/tests.c +++ b/src/tests.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -238,6 +239,29 @@ static void test_reset(void) { free_spellbooks(); free_prefixes(); mt_clear(); +/* + for (i = 0; i != MAXTERRAINS; ++i) { + int flags = 0; + if (i == T_FIREWALL) { + flags |= FORBIDDEN_REGION; + } else { + flags = FLY_INTO | WALK_INTO; + if (i == T_OCEAN) { + flags |= SEA_REGION | SWIM_INTO; + } + else { + flags |= LAND_REGION; + if (i == T_PLAIN) { + flags |= CAVALRY_REGION | FOREST_REGION; + } + else if (i == T_GLACIER || i == T_ICEBERG || i == T_ICEBERG_SLEEP) { + flags |= ARCTIC_REGION; + } + } + } + test_create_terrain(terrainnames[i], flags); + } +*/ for (i = 0; i != MAXSKILLS; ++i) { enable_skill(i, true); }