Use relations_with() for US==THEM || getrel(NP, THEM)
Replace patterns like "US == THEM || getrel(NP, THEM)...", where NP is known to be getnatp(US), by "relations_with(US, THEM)...". No functional change. Adds a few calls to getnatp() hidden in relations_with(), though. Keeping that optimized isn't worth it.
This commit is contained in:
parent
928e9a4cc3
commit
bdf63bc5fa
3 changed files with 6 additions and 7 deletions
|
@ -68,7 +68,7 @@ coun_list(struct natstr *natp)
|
|||
if (getplayer(cn)
|
||||
&& (player->god
|
||||
|| natp->nat_stat == STAT_GOD
|
||||
|| cn == player->cnum || getrel(natp, player->cnum) == ALLIED))
|
||||
|| relations_with(cn, player->cnum) == ALLIED))
|
||||
pr(" Now logged on ");
|
||||
else if (player->god) {
|
||||
if (natp->nat_last_login == 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue