forked from github/server
piraterie: eigene boote verfolgen sich? Ab sofort verfolgt man nur noch Boote von Leuten, denen man nicht HELFE BEWACHE gesetzt hat. Issue: 464
This commit is contained in:
parent
0050b6d11f
commit
5ddee57978
|
@ -61,6 +61,7 @@
|
|||
#include <attributes/follow.h>
|
||||
#include <attributes/targetregion.h>
|
||||
#include <attributes/at_movement.h>
|
||||
#include <attributes/otherfaction.h>
|
||||
|
||||
extern border_type bt_wisps;
|
||||
int * storms;
|
||||
|
@ -2042,10 +2043,14 @@ piracy_cmd(unit *u, struct order * ord)
|
|||
|
||||
for (sh2 = rc->ships; sh2; sh2 = sh2->next) {
|
||||
unit * cap = shipowner(sh2);
|
||||
if (cap && (intlist_find(il, cap->faction->no) || all)) {
|
||||
if (cap) {
|
||||
faction * f = visible_faction(cap->faction, cap);
|
||||
if (alliedunit(u, f, HELP_GUARD)) continue;
|
||||
if (all || intlist_find(il, cap->faction->no)) {
|
||||
aff[dir]++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Und aufaddieren. */
|
||||
saff += aff[dir];
|
||||
|
|
|
@ -879,20 +879,6 @@ ucansee(const struct faction *f, const struct unit *u, const struct unit *x)
|
|||
return x;
|
||||
}
|
||||
|
||||
faction *
|
||||
visible_faction(const faction *f, const unit * u)
|
||||
{
|
||||
if (!alliedunit(u, f, HELP_FSTEALTH)) {
|
||||
attrib *a = a_find(u->attribs, &at_otherfaction);
|
||||
if (a) {
|
||||
faction *fv = get_otherfaction(a);
|
||||
assert (fv != NULL); /* fv should never be NULL! */
|
||||
return fv;
|
||||
}
|
||||
}
|
||||
return u->faction;
|
||||
}
|
||||
|
||||
faction_list *
|
||||
get_addresses(faction * f, struct seen_region * seehash[])
|
||||
{
|
||||
|
|
|
@ -97,7 +97,6 @@ extern int bufunit_ugroupleader(const struct faction * f, const struct unit * u,
|
|||
#endif
|
||||
|
||||
extern const char * reportpath(void);
|
||||
extern struct faction * visible_faction(const struct faction *f, const struct unit * u);
|
||||
extern struct faction_list * get_addresses(struct faction * f, struct seen_region * seehash[]);
|
||||
extern const char * trailinto(const struct region * r, const struct locale * lang);
|
||||
|
||||
|
|
|
@ -1166,4 +1166,5 @@ countheroes(const struct faction * f)
|
|||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue