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

Function free_omonst

src/mkobj.c:127–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void
128free_omonst(struct obj *otmp)
129{
130 if (otmp->oextra) {
131 struct monst *m = OMONST(otmp);
132
133 if (m) {
134 if (m->mextra)
135 dealloc_mextra(m);
136 free((genericptr_t) m);
137 OMONST(otmp) = (struct monst *) 0;
138 }
139 }
140}
141
142void
143newomid(struct obj *otmp)

Callers 4

resetobjsFunction · 0.70
zombify_monFunction · 0.70
dealloc_oextraFunction · 0.70
reviveFunction · 0.70

Calls 1

dealloc_mextraFunction · 0.70

Tested by

no test coverage detected