shk followmsg moved to instance globals. early_init introduced.
This commit is contained in:
@@ -19,6 +19,15 @@ STATIC_DCL void FDECL(regen_hp, (int));
|
||||
STATIC_DCL void FDECL(interrupt_multi, (const char *));
|
||||
STATIC_DCL void FDECL(debug_fields, (const char *));
|
||||
|
||||
void
|
||||
early_init()
|
||||
{
|
||||
decl_globals_init();
|
||||
objects_globals_init();
|
||||
monst_globals_init();
|
||||
sys_early_init();
|
||||
}
|
||||
|
||||
void
|
||||
moveloop(resuming)
|
||||
boolean resuming;
|
||||
|
||||
@@ -611,6 +611,7 @@ const struct instance_globals g_init = {
|
||||
SELL_NORMAL, /* sell_how */
|
||||
FALSE, /* auto_credit */
|
||||
UNDEFINED_VALUES, /* repo */
|
||||
UNDEFINED_VALUES, /* followmsg */
|
||||
|
||||
/* sp_lev.c */
|
||||
NULL, /* lev_message */
|
||||
|
||||
@@ -25,7 +25,6 @@ STATIC_DCL void FDECL(kops_gone, (BOOLEAN_P));
|
||||
|
||||
extern const struct shclass shtypes[]; /* defined in shknam.c */
|
||||
|
||||
STATIC_VAR NEARDATA long int followmsg; /* last time of follow message */
|
||||
STATIC_VAR const char and_its_contents[] = " and its contents";
|
||||
STATIC_VAR const char the_contents_of[] = "the contents of ";
|
||||
|
||||
@@ -3692,7 +3691,7 @@ struct monst *shkp;
|
||||
eshkp->following = 0;
|
||||
return 0;
|
||||
}
|
||||
if (g.moves > followmsg + 4) {
|
||||
if (g.moves > g.followmsg + 4) {
|
||||
if (!Deaf && !muteshk(shkp))
|
||||
verbalize("%s, %s! Didn't you forget to pay?",
|
||||
Hello(shkp), g.plname);
|
||||
@@ -3700,7 +3699,7 @@ struct monst *shkp;
|
||||
pline("%s holds out %s upturned %s.",
|
||||
Shknam(shkp), noit_mhis(shkp),
|
||||
mbodypart(shkp, HAND));
|
||||
followmsg = g.moves;
|
||||
g.followmsg = g.moves;
|
||||
if (!rn2(9)) {
|
||||
pline("%s doesn't like customers who don't pay.",
|
||||
Shknam(shkp));
|
||||
|
||||
Reference in New Issue
Block a user