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

Function timer_is_local

src/timeout.c:2602–2618  ·  view source on GitHub ↗

* Return TRUE if the timer is attached to something that will stay on the * level when the level is saved. */

Source from the content-addressed store, hash-verified

2600 * level when the level is saved.
2601 */
2602staticfn boolean
2603timer_is_local(timer_element *timer)
2604{
2605 switch (timer->kind) {
2606 case TIMER_LEVEL:
2607 return TRUE;
2608 case TIMER_GLOBAL:
2609 return FALSE;
2610 case TIMER_OBJECT:
2611 return obj_is_local(timer->arg.a_obj);
2612 case TIMER_MONSTER:
2613 return mon_is_local(timer->arg.a_monst);
2614 }
2615 panic("timer_is_local");
2616 /*NOTREACHED*/
2617 return FALSE;
2618}
2619
2620RESTORE_WARNING_UNREACHABLE_CODE
2621

Callers 2

maybe_write_timerFunction · 0.85
save_timersFunction · 0.85

Calls 3

obj_is_localFunction · 0.85
mon_is_localFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected