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

Function nxt_unbypassed_obj

src/worn.c:1141–1152  ·  view source on GitHub ↗

return the first object without its bypass bit set; set that bit before returning so that successive calls will find further objects */

Source from the content-addressed store, hash-verified

1139/* return the first object without its bypass bit set; set that bit
1140 before returning so that successive calls will find further objects */
1141struct obj *
1142nxt_unbypassed_obj(struct obj *objchain)
1143{
1144 while (objchain) {
1145 if (!objchain->bypass) {
1146 bypass_obj(objchain);
1147 break;
1148 }
1149 objchain = objchain->nobj;
1150 }
1151 return objchain;
1152}
1153
1154/* like nxt_unbypassed_obj() but operates on sortloot_item array rather
1155 than an object linked list; the array contains obj==Null terminator;

Callers 3

menu_dropFunction · 0.85
retouch_equipmentFunction · 0.85
destroy_itemsFunction · 0.85

Calls 1

bypass_objFunction · 0.85

Tested by

no test coverage detected