From d418aca832050c3f586c06fcdd49eca9ec2b4c52 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 17 Jun 2008 22:35:18 +0000 Subject: [PATCH] http://bugs.eressea.de/view.php?id=1443 - fixed trails for drifitng ships with no units. - cleared up some TODOs Issue: 1443 --- src/common/gamecode/report.c | 1 + src/common/kernel/border.c | 2 -- src/common/kernel/move.c | 9 +++++---- src/common/kernel/region.c | 13 ++++++------- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/common/gamecode/report.c b/src/common/gamecode/report.c index c5d4ddb1a..94f86a598 100644 --- a/src/common/gamecode/report.c +++ b/src/common/gamecode/report.c @@ -1279,6 +1279,7 @@ durchreisende(FILE * F, const region * r, const faction * f) } } } + /* TODO: finish localization */ if (maxtravel == 1) { bytes = (int)strlcpy(bufp, " hat die Region durchquert.", size); } else { diff --git a/src/common/kernel/border.c b/src/common/kernel/border.c index 27a41da0a..37b1b0b6c 100644 --- a/src/common/kernel/border.c +++ b/src/common/kernel/border.c @@ -357,7 +357,6 @@ border_type bt_fogwall = { static const char * b_nameillusionwall(const border * b, const region * r, const struct faction * f, int gflags) { - /* TODO: UNICODE: f->locale bestimmt die Sprache */ int fno = b->data.i; unused(b); unused(r); @@ -394,7 +393,6 @@ boolean b_blockquestportal(const border * b, const unit * u, const region * r) { static const char * b_namequestportal(const border * b, const region * r, const struct faction * f, int gflags) { - /* TODO: UNICODE: f->locale bestimmt die Sprache */ const char * bname; int lock = b->data.i; unused(b); diff --git a/src/common/kernel/move.c b/src/common/kernel/move.c index 5d3640f83..3888d1811 100644 --- a/src/common/kernel/move.c +++ b/src/common/kernel/move.c @@ -582,16 +582,16 @@ move_ship(ship * sh, region * from, region * to, region_list * route) translist(&from->ships, &to->ships, sh); sh->region = to; } + if (!trail) { + leave_trail(sh, from, route); + trail = true; + } while (*iunit!=NULL) { unit *u = *iunit; assert(u->region == from); if (u->ship == sh) { - if (!trail) { - leave_trail(sh, from, route); - trail = true; - } if (route!=NULL) mark_travelthru(u, from, route, NULL); if (from!=to) { u->ship = NULL; /* damit move_unit() kein leave() macht */ @@ -2521,6 +2521,7 @@ movement(void) /** Overrides long orders with a FOLLOW order if the target is moving. * FOLLOW SHIP is a long order, and doesn't need to be treated in here. + * BUGS: http://bugs.eressea.de/view.php?id=1444 (A folgt B folgt C) */ void follow_unit(unit * u) diff --git a/src/common/kernel/region.c b/src/common/kernel/region.c index 94d6d10c3..ba633e02e 100644 --- a/src/common/kernel/region.c +++ b/src/common/kernel/region.c @@ -979,7 +979,8 @@ free_regions(void) } /** creates a name for a region - * TODO: Make this XML-configurable and allow non-ascii characters again. + * TODO: Make vowels XML-configurable and allow non-ascii characters again. + * - that will probably require a wchar_t * string to pick from. */ static char * makename(void) @@ -988,13 +989,11 @@ makename(void) size_t nk, ne, nv, ns; static char name[16]; const char *kons = "bcdfghklmnprstvwz", + *start = "bcdgtskpvfr", *end = "nlrdst", -#if 0 - *vowels = "aaaaaaaaaàâeeeeeeeeeéèêiiiiiiiiiíîoooooooooóòôuuuuuuuuuúyy", -#else - *vowels = "aaaaaaaaaaaeeeeeeeeeeeeiiiiiiiiiiioooooooooooouuuuuuuuuuyy", -#endif - *start = "bcdgtskpvfr"; + *vowels = "aaaaaaaaaaaeeeeeeeeeeeeiiiiiiiiiiioooooooooooouuuuuuuuuuyy"; + + /* const char * vowels_latin1 = "aaaaaaaaaàâeeeeeeeeeéèêiiiiiiiiiíîoooooooooóòôuuuuuuuuuúyy"; */ nk = strlen(kons); ne = strlen(end);