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

Function set_utrap

src/trap.c:1029–1042  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1027}
1028
1029void
1030set_utrap(unsigned int tim, unsigned int typ)
1031{
1032 /* if we get here through reset_utrap(), the caller of that might
1033 have already set u.utrap to 0 so this check won't be sufficient
1034 in that situation; caller will need to set context.botl itself */
1035 if (!u.utrap ^ !tim)
1036 disp.botl = TRUE;
1037
1038 u.utrap = tim;
1039 u.utraptype = tim ? typ : TT_NONE;
1040
1041 float_vs_flight(); /* maybe block Lev and/or Fly */
1042}
1043
1044void
1045reset_utrap(boolean msg)

Callers 11

digactualholeFunction · 0.85
bury_an_objFunction · 0.85
do_pitFunction · 0.85
polymanFunction · 0.85
polymonFunction · 0.85
reset_utrapFunction · 0.85
trapeffect_bear_trapFunction · 0.85
trapeffect_pitFunction · 0.85
trapeffect_webFunction · 0.85
lava_effectsFunction · 0.85
zap_over_floorFunction · 0.85

Calls 1

float_vs_flightFunction · 0.85

Tested by

no test coverage detected