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

Function disturb_buried_zombies

src/hack.c:1797–1813  ·  view source on GitHub ↗

reduce zombification timeout of buried zombies around px, py */

Source from the content-addressed store, hash-verified

1795
1796/* reduce zombification timeout of buried zombies around px, py */
1797void
1798disturb_buried_zombies(coordxy x, coordxy y)
1799{
1800 struct obj *otmp;
1801 long t;
1802
1803 for (otmp = svl.level.buriedobjlist; otmp; otmp = otmp->nobj) {
1804 if (otmp->otyp == CORPSE && otmp->timed
1805 && otmp->ox >= x - 1 && otmp->ox <= x + 1
1806 && otmp->oy >= y - 1 && otmp->oy <= y + 1
1807 && (t = peek_timer(ZOMBIFY_MON, obj_to_any(otmp))) > 0) {
1808 t = stop_timer(ZOMBIFY_MON, obj_to_any(otmp));
1809 (void) start_timer(max(1, (t*2/3)), TIMER_OBJECT,
1810 ZOMBIFY_MON, obj_to_any(otmp));
1811 }
1812 }
1813}
1814
1815/* return an appropriate locomotion word for hero */
1816const char *

Callers 5

moverock_coreFunction · 0.85
impact_disturbs_zombiesFunction · 0.85
domove_coreFunction · 0.85
wake_nearto_coreFunction · 0.85
dochugFunction · 0.85

Calls 4

peek_timerFunction · 0.85
obj_to_anyFunction · 0.85
stop_timerFunction · 0.85
start_timerFunction · 0.85

Tested by

no test coverage detected