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

Function mon_is_local

src/timeout.c:2583–2596  ·  view source on GitHub ↗

* Return TRUE if the given monster will stay on the level when the * level is saved. */

Source from the content-addressed store, hash-verified

2581 * level is saved.
2582 */
2583staticfn boolean
2584mon_is_local(struct monst *mon)
2585{
2586 struct monst *curr;
2587
2588 for (curr = gm.migrating_mons; curr; curr = curr->nmon)
2589 if (curr == mon)
2590 return FALSE;
2591 /* `gm.mydogs' is used during level changes, never saved and restored */
2592 for (curr = gm.mydogs; curr; curr = curr->nmon)
2593 if (curr == mon)
2594 return FALSE;
2595 return TRUE;
2596}
2597
2598/*
2599 * Return TRUE if the timer is attached to something that will stay on the

Callers 6

save_light_sourcesFunction · 0.85
maybe_write_lsFunction · 0.85
wiz_light_sourcesFunction · 0.85
timer_sanity_checkFunction · 0.85
obj_is_localFunction · 0.85
timer_is_localFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected