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

Function is_exclusion_zone

src/mkmaze.c:316–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

314}
315
316boolean
317is_exclusion_zone(xint16 type, coordxy x, coordxy y)
318{
319 struct exclusion_zone *ez = sve.exclusion_zones;
320
321 while (ez) {
322 if (((type == LR_DOWNTELE
323 && (ez->zonetype == LR_DOWNTELE || ez->zonetype == LR_TELE))
324 || (type == LR_UPTELE
325 && (ez->zonetype == LR_UPTELE || ez->zonetype == LR_TELE))
326 || type == ez->zonetype)
327 && within_bounded_area(x, y, ez->lx, ez->ly, ez->hx, ez->hy))
328 return TRUE;
329 ez = ez->next;
330 }
331 return FALSE;
332}
333
334/*
335 * Bad if:

Callers 2

goodposFunction · 0.85
put_lregion_hereFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected