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

Function unconstrain_map

src/detect.c:69–81  ·  view source on GitHub ↗

bring hero out from underwater or underground or being engulfed; return True iff any change occurred */

Source from the content-addressed store, hash-verified

67/* bring hero out from underwater or underground or being engulfed;
68 return True iff any change occurred */
69staticfn boolean
70unconstrain_map(void)
71{
72 boolean res = u.uinwater || u.uburied || u.uswallow;
73
74 /* bring Underwater, buried, or swallowed hero to normal map;
75 bypass set_uinwater() */
76 iflags.save_uinwater = u.uinwater, u.uinwater = 0;
77 iflags.save_uburied = u.uburied, u.uburied = 0;
78 iflags.save_uswallow = u.uswallow, u.uswallow = 0;
79
80 return res;
81}
82
83/* put hero back underwater or underground or engulfed */
84staticfn void

Callers 9

gold_detectFunction · 0.85
food_detectFunction · 0.85
object_detectFunction · 0.85
monster_detectFunction · 0.85
display_trap_mapFunction · 0.85
furniture_detectFunction · 0.85
do_mappingFunction · 0.85
do_vicinity_mapFunction · 0.85
reveal_terrainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected