From 9fcab4ccb82a4e33c52e02c42f1a6aa0e1d1b8dc Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 17 Apr 2017 20:18:37 +0200 Subject: [PATCH] do not hard-code list of allowed races for demons. --- src/spy.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/spy.c b/src/spy.c index 10f467ad9..391313aa3 100644 --- a/src/spy.c +++ b/src/spy.c @@ -247,15 +247,7 @@ int setstealth_cmd(unit * u, struct order *ord) if (trace) { /* demons can cloak as other player-races */ if (u_race(u) == get_race(RC_DAEMON)) { - race_t allowed[] = { RC_DWARF, RC_ELF, RC_ORC, RC_GOBLIN, RC_HUMAN, - RC_TROLL, RC_DAEMON, RC_INSECT, RC_HALFLING, RC_CAT, RC_AQUARIAN, - NORACE - }; - int i; - for (i = 0; allowed[i] != NORACE; ++i) - if (get_race(allowed[i]) == trace) - break; - if (allowed[i]!=NORACE && get_race(allowed[i]) == trace) { + if (playerrace(trace)) { u->irace = trace; if (u_race(u)->flags & RCF_SHAPESHIFTANY && get_racename(u->attribs)) set_racename(&u->attribs, NULL);