forked from github/server
hack to ignore otherfaction attributes if faction stealth is not allowed.
This commit is contained in:
parent
52013f0e7c
commit
63799d823d
1 changed files with 13 additions and 4 deletions
|
@ -38,10 +38,19 @@ void write_of(const struct attrib *a, const void *owner, struct storage *store)
|
|||
|
||||
int read_of(struct attrib *a, void *owner, struct storage *store)
|
||||
{ /* return 1 on success, 0 if attrib needs removal */
|
||||
int of = store->r_int(store);
|
||||
int of;
|
||||
static int rule = -1;
|
||||
if (rule<0) {
|
||||
rule = rule_stealth_faction();
|
||||
}
|
||||
|
||||
of = store->r_int(store);
|
||||
if (rule&2) {
|
||||
a->data.v = findfaction(of);
|
||||
if (a->data.v)
|
||||
if (a->data.v) {
|
||||
return AT_READ_OK;
|
||||
}
|
||||
}
|
||||
return AT_READ_FAIL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue