MCPcopy Index your code
hub / github.com/NetHack/NetHack / newomonst

Function newomonst

src/mkobj.c:113–125  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111}
112
113void
114newomonst(struct obj *otmp)
115{
116 if (!otmp->oextra)
117 otmp->oextra = newoextra();
118
119 if (!OMONST(otmp)) {
120 struct monst *m = newmonst();
121
122 *m = cg.zeromonst;
123 OMONST(otmp) = m;
124 }
125}
126
127void
128free_omonst(struct obj *otmp)

Callers 3

restobjFunction · 0.70
copy_oextraFunction · 0.70
save_mtraitsFunction · 0.70

Calls 1

newoextraFunction · 0.70

Tested by

no test coverage detected