this old race alias stuff has been dead code for years.

This commit is contained in:
Enno Rehling 2014-08-06 23:44:47 +02:00
parent 71056cc2e5
commit 405c63f447
1 changed files with 2 additions and 14 deletions

View File

@ -146,26 +146,14 @@ void free_races(void) {
} }
} }
static const char *racealias[][2] = {
{"uruk", "orc"}, /* there was a time when the orc race was called uruk (and there were other orcs). That was really confusing */
{"skeletton lord", "skeleton lord"}, /* we once had a typo here. it is fixed */
{NULL, NULL}
};
static race *rc_find_i(const char *name) static race *rc_find_i(const char *name)
{ {
const char *rname = name; const char *rname = name;
race *rc = races; race *rc = races;
int i;
for (i = 0; racealias[i][0]; ++i) { while (rc && !strcmp(rname, rc->_name[0]) == 0) {
if (strcmp(racealias[i][0], name) == 0) { rc = rc->next;
rname = racealias[i][1];
break;
}
} }
while (rc && !strcmp(rname, rc->_name[0]) == 0)
rc = rc->next;
return rc; return rc;
} }