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

Function sobj_at

src/invent.c:1465–1475  ·  view source on GitHub ↗

try to find a particular type of object at designated map location */

Source from the content-addressed store, hash-verified

1463
1464/* try to find a particular type of object at designated map location */
1465struct obj *
1466sobj_at(int otyp, coordxy x, coordxy y)
1467{
1468 struct obj *otmp;
1469
1470 for (otmp = svl.level.objects[x][y]; otmp; otmp = otmp->nexthere)
1471 if (otmp->otyp == otyp)
1472 break;
1473
1474 return otmp;
1475}
1476
1477/* sobj_at(&c) traversal -- find next object of specified type */
1478struct obj *

Callers 15

mkundeadFunction · 0.85
trapped_chest_atFunction · 0.85
premap_detectFunction · 0.85
landing_spotFunction · 0.85
dismount_steedFunction · 0.85
goodpos_onscaryFunction · 0.85
goodposFunction · 0.85
moverock_coreFunction · 0.85
still_chewingFunction · 0.85
bad_rockFunction · 0.85
test_moveFunction · 0.85
findtravelpathFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_moveFunction · 0.68