- Workaround für falsches a_otherfaction

This commit is contained in:
Christian Schlittchen 2002-03-24 08:37:07 +00:00
parent a12170916c
commit c0c71cbfb1
1 changed files with 8 additions and 1 deletions

View File

@ -847,7 +847,14 @@ visible_faction(const faction *f, const unit * u)
{
if(!allied(u, f, HELP_FSTEALTH)) {
attrib *a = a_find(u->attribs, &at_otherfaction);
if (a) return get_otherfaction(a);
if (a) {
faction *fv = get_otherfaction(a);
if(fv != NULL) {
return fv; /* fv should never be NULL! */
} else {
a_removeall(&u->attribs, &at_otherfaction); /* workaround, if this is triggered, it's a bug */
}
}
}
return u->faction;
}