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

Function reset_justpicked

src/pickup.c:615–632  ·  view source on GitHub ↗

reset last-picked-up flags */

Source from the content-addressed store, hash-verified

613
614/* reset last-picked-up flags */
615void
616reset_justpicked(struct obj *olist)
617{
618 struct obj *otmp;
619 /*
620 * TODO? Possible enhancement: don't reset if hero is still at same
621 * spot where most recent pickup took place. Not resetting will be
622 * the correct behavior for autopickup immediately followed by manual
623 * pickup. It would probably be correct for either or both pickups
624 * followed by manual pickup of a newly arrived missile after some
625 * time has elapsed. Things becomes murkier for other activity.
626 * Taking anything out of a container ought to be treated as if
627 * having moved to another spot.
628 */
629
630 for (otmp = olist; otmp; otmp = otmp->nobj)
631 otmp->pickup_prev = 0;
632}
633
634int
635count_justpicked(struct obj *olist)

Callers 3

moveloop_preambleFunction · 0.85
addinv_core0Function · 0.85
pickupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected