strassengrössen wurden falschrum interpretiert

This commit is contained in:
Enno Rehling 2005-06-12 08:44:59 +00:00
parent ddac39dcfa
commit bf91474325
1 changed files with 3 additions and 3 deletions

View File

@ -418,14 +418,14 @@ static const char *
b_nameroad(const border * b, const region * r, const struct faction * f, int gflags) b_nameroad(const border * b, const region * r, const struct faction * f, int gflags)
{ {
region * r2 = (r==b->to)?b->from:b->to; region * r2 = (r==b->to)?b->from:b->to;
int local = (r==b->to)?b->data.sa[0]:b->data.sa[1]; int local = (r==b->from)?b->data.sa[0]:b->data.sa[1];
static char buffer[64]; static char buffer[64];
unused(f); unused(f);
if (gflags & GF_ARTICLE) { if (gflags & GF_ARTICLE) {
if (!(gflags & GF_DETAILED)) strcpy(buffer, "eine Straße"); if (!(gflags & GF_DETAILED)) strcpy(buffer, "eine Straße");
else if (terrain[rterrain(r)].roadreq<=local) { else if (terrain[rterrain(r)].roadreq<=local) {
int remote = (r!=b->to)?b->data.sa[0]:b->data.sa[1]; int remote = (r2==b->from)?b->data.sa[0]:b->data.sa[1];
if (terrain[rterrain(r2)].roadreq<=remote) { if (terrain[rterrain(r2)].roadreq<=remote) {
strcpy(buffer, "eine Straße"); strcpy(buffer, "eine Straße");
} else { } else {
@ -468,7 +468,7 @@ static boolean
b_rvisibleroad(const border * b, const region * r) b_rvisibleroad(const border * b, const region * r)
{ {
int x = b->data.i; int x = b->data.i;
x = (r==b->to)?(x & 0xFFFF):((x>>16) & 0xFFFF); x = (r==b->from)?b->data.sa[0]:b->data.sa[1];
if (x==0) return false; if (x==0) return false;
return (boolean)(b->to==r || b->from==r); return (boolean)(b->to==r || b->from==r);
} }