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

Function obj_is_local

src/timeout.c:2553–2577  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2551}
2552
2553DISABLE_WARNING_UNREACHABLE_CODE
2554
2555/*
2556 * Return TRUE if the object will stay on the level when the level is
2557 * saved.
2558 */
2559boolean
2560obj_is_local(struct obj *obj)
2561{
2562 switch (obj->where) {
2563 case OBJ_INVENT:
2564 case OBJ_MIGRATING:
2565 return FALSE;
2566 case OBJ_FLOOR:
2567 case OBJ_BURIED:
2568 return TRUE;
2569 case OBJ_CONTAINED:
2570 return obj_is_local(obj->ocontainer);
2571 case OBJ_MINVENT:
2572 return mon_is_local(obj->ocarry);
2573 }
2574 panic("obj_is_local");
2575 /*NOTREACHED*/
2576 return FALSE;
2577}
2578
2579/*
2580 * Return TRUE if the given monster will stay on the level when the

Callers 3

save_light_sourcesFunction · 0.85
maybe_write_lsFunction · 0.85
timer_is_localFunction · 0.85

Calls 2

mon_is_localFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected