Use relations_with() for getrel(getnatp(US), THEM) where US!=THEM
Replacing getrel(getnatp(US), THEM) by relations_with(US, THEM) makes a difference only when US equals THEM. Replace in places where it's obvious that they're not equal. Note: getsect() sets player->owner to "player is god or owns this sector". Thus, after getsect(..., §), sect.sct_own == player->cnum implies player->owner. Conversely, !player->owner implies sect.sct_own != player->cnum. Similarly for getship(), getplane() and nxtitem().
This commit is contained in:
parent
6807cd91b5
commit
8cb7b75557
10 changed files with 20 additions and 20 deletions
|
@ -164,7 +164,7 @@ assa(void)
|
|||
for (qp = olist.q_forw; qp != &olist; qp = next) {
|
||||
next = qp->q_forw;
|
||||
llp = (struct ulist *)qp;
|
||||
rel = getrel(getnatp(def->own), player->cnum);
|
||||
rel = relations_with(def->own, player->cnum);
|
||||
if (chance(0.10) || rel == ALLIED || !def->own) {
|
||||
pr("%s made it on shore safely.\n", prland(&llp->unit.land));
|
||||
llp->unit.land.lnd_x = def->x;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue