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

Function stackobj

src/invent.c:4365–4375  ·  view source on GitHub ↗

'obj' is being placed on the floor; if it can merge with something that is already there, combine them and discard obj as a separate object */

Source from the content-addressed store, hash-verified

4363/* 'obj' is being placed on the floor; if it can merge with something that
4364 is already there, combine them and discard obj as a separate object */
4365void
4366stackobj(struct obj *obj)
4367{
4368 struct obj *otmp;
4369
4370 for (otmp = svl.level.objects[obj->ox][obj->oy]; otmp;
4371 otmp = otmp->nexthere)
4372 if (otmp != obj && merged(&obj, &otmp))
4373 break;
4374 return;
4375}
4376
4377/* returns TRUE if obj & otmp can be merged; used in invent.c and mkobj.c */
4378boolean

Callers 15

done_object_cleanupFunction · 0.85
lay_an_eggFunction · 0.85
mdrop_objFunction · 0.85
dropzFunction · 0.85
possibly_unwieldFunction · 0.85
zap_digFunction · 0.85
buried_ball_to_freedomFunction · 0.85
unearth_objsFunction · 0.85
throwitFunction · 0.85
throw_goldFunction · 0.85
breakchestlockFunction · 0.85
move_goldFunction · 0.85

Calls 1

mergedFunction · 0.85

Tested by

no test coverage detected