From 4e774197a6161c015f350933430a20449782c96b Mon Sep 17 00:00:00 2001 From: Bart House Date: Thu, 22 Nov 2018 15:40:31 -0800 Subject: [PATCH] Previous encumberance state moved to decl.c. --- include/decl.h | 3 +++ src/decl.c | 5 +++++ src/pickup.c | 1 - 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/decl.h b/include/decl.h index 992e86ad5..7fcde0c6c 100644 --- a/include/decl.h +++ b/include/decl.h @@ -437,6 +437,9 @@ struct early_opt { boolean valallowed; }; +/* encumbrance */ +E int oldcap; + #undef E #endif /* DECL_H */ diff --git a/src/decl.c b/src/decl.c index 6c26b4422..c3397a048 100644 --- a/src/decl.c +++ b/src/decl.c @@ -214,6 +214,9 @@ NEARDATA struct monst *migrating_mons = (struct monst *) 0; NEARDATA struct mvitals mvitals[NUMMONS]; +/* originally from pickup.c */ +int oldcap = 0; /* encumbrance */ + NEARDATA struct c_color_names c_color_names = { "black", "amber", "golden", "light blue", "red", "green", "silver", "blue", "purple", "white", "orange" @@ -525,6 +528,8 @@ decl_early_init() ZERO(ubirthday); ZERO(urealtime); + ZERO(oldcap); + ZEROARRAY(lastseentyp); ZEROPTR(invent); diff --git a/src/pickup.c b/src/pickup.c index d68def38d..b32640dbd 100644 --- a/src/pickup.c +++ b/src/pickup.c @@ -1556,7 +1556,6 @@ struct obj *otmp; int encumber_msg() { - static int oldcap = UNENCUMBERED; int newcap = near_capacity(); if (oldcap < newcap) { -- 2.40.0