MCPcopy Create free account
hub / github.com/NetHack/NetHack / character_race

Function character_race

src/role.c:2162–2171  ·  view source on GitHub ↗

if pmindex is any player race (not necessarily the hero's), return a pointer to the races[] entry for it; if pmindex is for some other type of monster which isn't a player race, return Null */

Source from the content-addressed store, hash-verified

2160 return a pointer to the races[] entry for it; if pmindex is for some
2161 other type of monster which isn't a player race, return Null */
2162const struct Race *
2163character_race(short pmindex)
2164{
2165 const struct Race *r;
2166
2167 for (r = races; r->noun != NULL; ++r)
2168 if (r->mnum == pmindex)
2169 return r;
2170 return (const struct Race *) NULL;
2171}
2172
2173/*--------------------------------------------------------------------------*/
2174

Callers 1

uasmon_maxStrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected