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

Function movemon

src/mon.c:1325–1350  ·  view source on GitHub ↗

perform movement for all monsters */

Source from the content-addressed store, hash-verified

1323
1324/* perform movement for all monsters */
1325int
1326movemon(void)
1327{
1328 gs.somebody_can_move = FALSE;
1329
1330 iter_mons_safe(movemon_singlemon);
1331
1332 if (any_light_source())
1333 gv.vision_full_recalc = 1; /* in case a mon moved w/ a light source */
1334 /* reset obj bypasses after last monster has moved */
1335 if (svc.context.bypasses)
1336 clear_bypasses();
1337 clear_splitobjs();
1338 /* remove dead monsters; dead vault guard will be left at <0,0>
1339 if temporary corridor out of vault hasn't been removed yet */
1340 dmonsfree();
1341
1342 /* a monster may have levteleported player -dlc */
1343 if (u.utotype) {
1344 deferred_goto();
1345 /* changed levels, so these monsters are dormant */
1346 gs.somebody_can_move = FALSE;
1347 }
1348
1349 return gs.somebody_can_move;
1350}
1351
1352/* dispose of contents of an eaten container; used for pets and other mons */
1353void

Callers 1

allmain.cFile · 0.85

Calls 6

iter_mons_safeFunction · 0.85
any_light_sourceFunction · 0.85
clear_bypassesFunction · 0.85
clear_splitobjsFunction · 0.85
dmonsfreeFunction · 0.85
deferred_gotoFunction · 0.85

Tested by

no test coverage detected