Move realms from the nation file into a new realms file:
(boundstr, realmstr): Rename, new members ef_type, r_cnum, r_uid, r_realm, r_timestamp. (natstr): Remove member nat_b[]. (EF_REALM, realm_ca): New. (empfile): Add it. (ef_open_srv, ef_close_srv, main): Deal with new file. (getrealm, putrealm): New. (add, new, real, list_realm, sarg_getrange): Use them.
This commit is contained in:
parent
04a8b84592
commit
45adbdb00e
11 changed files with 94 additions and 34 deletions
|
@ -100,6 +100,7 @@ sarg_getrange(char *str, struct range *rp)
|
|||
{
|
||||
long rlm;
|
||||
struct natstr *np;
|
||||
struct realmstr realm;
|
||||
char *end;
|
||||
|
||||
if (*str == '#') {
|
||||
|
@ -114,11 +115,11 @@ sarg_getrange(char *str, struct range *rp)
|
|||
return 0;
|
||||
} else
|
||||
rlm = 0;
|
||||
np = getnatp(player->cnum);
|
||||
rp->lx = np->nat_b[rlm].b_xl;
|
||||
rp->hx = np->nat_b[rlm].b_xh;
|
||||
rp->ly = np->nat_b[rlm].b_yl;
|
||||
rp->hy = np->nat_b[rlm].b_yh;
|
||||
getrealm(rlm, player->cnum, &realm);
|
||||
rp->lx = realm.r_xl;
|
||||
rp->hx = realm.r_xh;
|
||||
rp->ly = realm.r_yl;
|
||||
rp->hy = realm.r_yh;
|
||||
} else {
|
||||
/*
|
||||
* full map specification
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue