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);