From 815a1b419310bf6099d6fb9e50936b0acbad9df4 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 19 Jun 2011 18:52:32 +0200 Subject: [PATCH] Change xdump realm not to dump unused countries' realms Affects only deities; mortals can only see their own realms. --- src/lib/commands/xdump.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/commands/xdump.c b/src/lib/commands/xdump.c index 72d6e713..dfa7f840 100644 --- a/src/lib/commands/xdump.c +++ b/src/lib/commands/xdump.c @@ -57,7 +57,6 @@ xdvisible(int type, void *p) switch (type) { case EF_SECTOR: - case EF_REALM: return gp->own == player->cnum || player->god; case EF_SHIP: case EF_PLANE: @@ -86,6 +85,10 @@ xdvisible(int type, void *p) case EF_TRADE: case EF_COMM: return gp->own != 0; + case EF_REALM: + natp = getnatp(((struct realmstr *)p)->r_cnum); + return (gp->own == player->cnum || player->god) + && (natp->nat_stat != STAT_UNUSED); case EF_PRODUCT: return ((struct pchrstr *)p)->p_sname[0] != 0; case EF_SHIP_CHR: