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

Function blocking_terrain

src/mthrowu.c:1281–1288  ·  view source on GitHub ↗

return TRUE if terrain at x,y blocks linedup checks */

Source from the content-addressed store, hash-verified

1279
1280/* return TRUE if terrain at x,y blocks linedup checks */
1281staticfn boolean
1282blocking_terrain(coordxy x, coordxy y)
1283{
1284 if (!isok(x, y) || IS_OBSTRUCTED(levl[x][y].typ) || closed_door(x, y)
1285 || is_waterwall(x, y) || levl[x][y].typ == LAVAWALL)
1286 return TRUE;
1287 return FALSE;
1288}
1289
1290/* Move from (ax,ay) to (bx,by), but only if distance is up to BOLT_LIM
1291 and only in straight line or diagonal, calling fnc for each step.

Callers 2

linedup_callbackFunction · 0.85
linedupFunction · 0.85

Calls 3

isokFunction · 0.85
closed_doorFunction · 0.85
is_waterwallFunction · 0.85

Tested by

no test coverage detected