(powe): Simplify evaluation of arg 1. No functional change.
This commit is contained in:
parent
7282d4d639
commit
b27c7ea77d
1 changed files with 22 additions and 19 deletions
|
@ -73,7 +73,9 @@ powe(void)
|
|||
memset(targets, 0, sizeof(targets));
|
||||
natp = getnatp(player->cnum);
|
||||
num = MAXNOC;
|
||||
if (player->argp[1] && player->argp[1][0] == 'n') {
|
||||
|
||||
if (player->argp[1]) {
|
||||
if (player->argp[1][0] == 'n') {
|
||||
if (natp->nat_btu < 1)
|
||||
pr("\n Insufficient BTUs, using the last report.\n\n");
|
||||
else {
|
||||
|
@ -82,7 +84,7 @@ powe(void)
|
|||
if (player->argp[2])
|
||||
num = atoi(player->argp[2]);
|
||||
}
|
||||
} else if (player->argp[1] && player->argp[1][0] == 'c') {
|
||||
} else if (player->argp[1][0] == 'c') {
|
||||
snxtitem(&ni, EF_NATION, player->argp[2]);
|
||||
while (nxtitem(&ni, &nat)) {
|
||||
if (nat.nat_stat != STAT_ACTIVE)
|
||||
|
@ -90,8 +92,9 @@ powe(void)
|
|||
targets[nat.nat_cnum] = 1;
|
||||
}
|
||||
use_targets = 1;
|
||||
} else if (player->argp[1])
|
||||
} else
|
||||
num = atoi(player->argp[1]);
|
||||
}
|
||||
|
||||
if (num < 0) {
|
||||
if (!player->god)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue