From: Bart House Date: Thu, 22 Nov 2018 23:40:31 +0000 (-0800) Subject: Previous encumberance state moved to decl.c. X-Git-Tag: NetHack-3.6.2_Released~161^2~34^2~17^2~2^2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=79e0a11c15ba03af2dc57359e7b0b42b4767576a;p=nethack Previous encumberance state moved to decl.c. --- 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) {