Previous encumberance state moved to decl.c.

This commit is contained in:
Bart House
2018-11-23 15:22:51 -08:00
parent acbe4d9242
commit 4e774197a6
3 changed files with 8 additions and 1 deletions
+3
View File
@@ -437,6 +437,9 @@ struct early_opt {
boolean valallowed; boolean valallowed;
}; };
/* encumbrance */
E int oldcap;
#undef E #undef E
#endif /* DECL_H */ #endif /* DECL_H */
+5
View File
@@ -214,6 +214,9 @@ NEARDATA struct monst *migrating_mons = (struct monst *) 0;
NEARDATA struct mvitals mvitals[NUMMONS]; NEARDATA struct mvitals mvitals[NUMMONS];
/* originally from pickup.c */
int oldcap = 0; /* encumbrance */
NEARDATA struct c_color_names c_color_names = { NEARDATA struct c_color_names c_color_names = {
"black", "amber", "golden", "light blue", "red", "green", "black", "amber", "golden", "light blue", "red", "green",
"silver", "blue", "purple", "white", "orange" "silver", "blue", "purple", "white", "orange"
@@ -525,6 +528,8 @@ decl_early_init()
ZERO(ubirthday); ZERO(ubirthday);
ZERO(urealtime); ZERO(urealtime);
ZERO(oldcap);
ZEROARRAY(lastseentyp); ZEROARRAY(lastseentyp);
ZEROPTR(invent); ZEROPTR(invent);
-1
View File
@@ -1556,7 +1556,6 @@ struct obj *otmp;
int int
encumber_msg() encumber_msg()
{ {
static int oldcap = UNENCUMBERED;
int newcap = near_capacity(); int newcap = near_capacity();
if (oldcap < newcap) { if (oldcap < newcap) {