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

Function doorless_door

src/hack.c:4062–4074  ·  view source on GitHub ↗

check for a doorway which lacks its door (NODOOR or BROKEN) */

Source from the content-addressed store, hash-verified

4060
4061/* check for a doorway which lacks its door (NODOOR or BROKEN) */
4062boolean
4063doorless_door(coordxy x, coordxy y)
4064{
4065 struct rm *lev_p = &levl[x][y];
4066
4067 if (!IS_DOOR(lev_p->typ))
4068 return FALSE;
4069 /* all rogue level doors are doorless but disallow diagonal access, so
4070 we treat them as if their non-existent doors were actually present */
4071 if (Is_rogue_level(&u.uz))
4072 return FALSE;
4073 return !(lev_p->doormask & ~(D_NODOOR | D_BROKEN));
4074}
4075
4076/* used by drown() to check whether hero can crawl from water to <x,y>;
4077 also used by findtravelpath() when destination is one step away */

Callers 4

mhitm_knockbackFunction · 0.85
moverock_coreFunction · 0.85
test_moveFunction · 0.85
crawl_destinationFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_moveFunction · 0.68