More globals moved to instance_globals.

This commit is contained in:
Bart House
2018-12-19 21:26:35 -08:00
parent b7a0e69998
commit 576eece500
65 changed files with 498 additions and 505 deletions

View File

@@ -487,7 +487,7 @@ int what; /* should be a long */
and read_engr_at in addition to bypassing autopickup itself
[probably ought to check whether hero is using a cockatrice
corpse for a pillow here... (also at initial faint/sleep)] */
if (autopickup && multi < 0 && unconscious())
if (autopickup && g.multi < 0 && unconscious())
return 0;
if (what < 0) /* pick N of something */
@@ -507,7 +507,7 @@ int what; /* should be a long */
}
/* no pickup if levitating & not on air or water level */
if (!can_reach_floor(TRUE)) {
if ((multi && !context.run) || (autopickup && !flags.pickup)
if ((g.multi && !context.run) || (autopickup && !flags.pickup)
|| ((ttmp = t_at(u.ux, u.uy)) != 0
&& uteetering_at_seen_pit(ttmp)))
read_engr_at(u.ux, u.uy);
@@ -517,7 +517,7 @@ int what; /* should be a long */
* action, or possibly paralyzed, sleeping, etc.... and they just
* teleported onto the object. They shouldn't pick it up.
*/
if ((multi && !context.run) || (autopickup && !flags.pickup)) {
if ((g.multi && !context.run) || (autopickup && !flags.pickup)) {
check_here(FALSE);
return 0;
}
@@ -2478,9 +2478,9 @@ boolean more_containers; /* True iff #loot multiple and this isn't last one */
obj->lknown = 1;
(void) chest_trap(obj, HAND, FALSE);
/* even if the trap fails, you've used up this turn */
if (multi >= 0) { /* in case we didn't become paralyzed */
if (g.multi >= 0) { /* in case we didn't become paralyzed */
nomul(-1);
multi_reason = "opening a container";
g.multi_reason = "opening a container";
nomovemsg = "";
}
g.abort_looting = TRUE;
@@ -3085,9 +3085,9 @@ struct obj *box; /* or bag */
/* we're not reaching inside but we're still handling it... */
(void) chest_trap(box, HAND, FALSE);
/* even if the trap fails, you've used up this turn */
if (multi >= 0) { /* in case we didn't become paralyzed */
if (g.multi >= 0) { /* in case we didn't become paralyzed */
nomul(-1);
multi_reason = "tipping a container";
g.multi_reason = "tipping a container";
nomovemsg = "";
}
} else if (box->otyp == BAG_OF_TRICKS || box->otyp == HORN_OF_PLENTY) {