trap setting bit

Treat a trap object that has become the focus of trap setting
occupation as if it had already been used up.  (No discernable change
in behavior unless someone adds an artifact bear trap or landmine
that talks.)

Shouldn't 'trapinfo' be part of 'context' and be saved and restored?
(If so, it will need to include o_id and undergo pointer fixup during
restore.)  When trap arming is in progress hero will be too busy for
player to issue S(ave) command but a hangup save could take place.
This commit is contained in:
PatR
2023-05-23 15:34:58 -07:00
parent 8385d0a10e
commit 6586cc84b2
2 changed files with 8 additions and 6 deletions

View File

@@ -640,7 +640,7 @@ stop_occupation(void)
if (go.occupation) {
if (!maybe_finished_meal(TRUE))
You("stop %s.", go.occtxt);
go.occupation = 0;
go.occupation = (int (*)(void)) 0;
gc.context.botl = TRUE; /* in case u.uhs changed */
nomul(0);
} else if (gm.multi >= 0) {