Change nation status from bits to a simple enum:
(nat_status, STAT_UNUSED, STAT_VIS, STAT_ACTIVE): New. (STAT_NEW, STAT_SANCT, STAT_GOD): Change into nat_status members. (STAT_INUSE, STAT_NORM): Remove. (natstr): Use new nat_status for nat_stat. New value Old value STAT_UNUSED 0 STAT_NEW STAT_INUSE | STAT_NEW STAT_VIS STAT_INUSE STAT_SANCT STAT_INUSE | STAT_SANCT STAT_ACTIVE STAT_INUSE | STAT_NORM STAT_GOD STAT_INUSE | STAT_NORM | STAT_GOD Users changed.
This commit is contained in:
parent
41c2c27376
commit
8b16c31223
35 changed files with 113 additions and 151 deletions
|
@ -103,8 +103,7 @@ tele(void)
|
|||
}
|
||||
|
||||
natp = getnatp(to);
|
||||
if (((natp->nat_stat & STAT_NORM) == 0) &&
|
||||
((natp->nat_stat & STAT_SANCT) == 0)) {
|
||||
if (natp->nat_stat < STAT_SANCT) {
|
||||
pr("%s has no \"telegram priveleges\".\n", cname(to));
|
||||
kk++;
|
||||
continue;
|
||||
|
@ -119,8 +118,8 @@ tele(void)
|
|||
return RET_FAIL;
|
||||
}
|
||||
|
||||
if (!player->god &&
|
||||
(natp->nat_stat & GOD) != GOD && player->cnum != to)
|
||||
if (!player->god && natp->nat_stat != STAT_GOD
|
||||
&& player->cnum != to)
|
||||
nreport(player->cnum, N_SENT_TEL, to, 1);
|
||||
if (opt_HIDDEN) {
|
||||
setcont(to, player->cnum, FOUND_TELE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue