MCPcopy Create free account
hub / github.com/crawl/crawl / _update_gate_exclusions

Function _update_gate_exclusions

crawl-ref/source/exclude.cc:365–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

363}
364
365static void _update_gate_exclusions(coord_def c)
366{
367 const dungeon_feature_type feat = env.map_knowledge(c).feat();
368 if (!feat_is_door(feat))
369 return;
370
371 travel_exclude* exc = curr_excludes.get_exclude_root(c);
372 if (exc)
373 return;
374
375 string prop = env.markers.property_at(c, MAT_ANY, "connected_exclude");
376 if (!prop.empty())
377 return;
378
379 if (_is_gate_that_spreads_exclusion(c + coord_def(1, 0), feat)
380 || _is_gate_that_spreads_exclusion(c + coord_def(-1, 0), feat)
381 || _is_gate_that_spreads_exclusion(c + coord_def(0, 1), feat)
382 || _is_gate_that_spreads_exclusion(c + coord_def(0, -1), feat))
383 {
384 _exclude_gate(c);
385 }
386}
387
388/*
389 * Update exclusions' LOS to reflect changes within their range.

Callers 1

update_exclusion_losFunction · 0.85

Calls 8

feat_is_doorFunction · 0.85
_exclude_gateFunction · 0.85
get_exclude_rootMethod · 0.80
coord_defClass · 0.70
featMethod · 0.45
property_atMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected