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

Function delallobj

src/invent.c:1412–1426  ·  view source on GitHub ↗

drawbridge is destroying all objects at */

Source from the content-addressed store, hash-verified

1410
1411/* drawbridge is destroying all objects at <x,y> */
1412void
1413delallobj(coordxy x, coordxy y)
1414{
1415 struct obj *otmp, *otmp2;
1416
1417 for (otmp = svl.level.objects[x][y]; otmp; otmp = otmp2) {
1418 if (otmp == uball)
1419 unpunish();
1420 /* after unpunish(), or might get deallocated chain */
1421 otmp2 = otmp->nexthere;
1422 if (otmp == uchain)
1423 continue;
1424 delobj(otmp);
1425 }
1426}
1427
1428/* normal object deletion (if unpaid, it remains on the bill) */
1429void

Callers 2

close_drawbridgeFunction · 0.85
open_drawbridgeFunction · 0.85

Calls 2

unpunishFunction · 0.85
delobjFunction · 0.85

Tested by

no test coverage detected