remove a set_uasmon() call from iter_mons() processing
Reported by hackemslashem.
This commit is contained in:
@@ -1061,6 +1061,7 @@ struct instance_globals_w {
|
|||||||
|
|
||||||
/* new */
|
/* new */
|
||||||
struct win_settings wsettings; /* wintype.h */
|
struct win_settings wsettings; /* wintype.h */
|
||||||
|
long were_changes; /* were.c, allmain.c */
|
||||||
|
|
||||||
boolean havestate;
|
boolean havestate;
|
||||||
unsigned long magic; /* validate that structure layout is preserved */
|
unsigned long magic; /* validate that structure layout is preserved */
|
||||||
|
|||||||
@@ -201,6 +201,7 @@ moveloop_core(void)
|
|||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
|
||||||
/* set up for a new turn */
|
/* set up for a new turn */
|
||||||
|
gw.were_changes = 0L;
|
||||||
mcalcdistress(); /* adjust monsters' trap, blind, etc */
|
mcalcdistress(); /* adjust monsters' trap, blind, etc */
|
||||||
|
|
||||||
/* reallocate movement rations to monsters; don't need
|
/* reallocate movement rations to monsters; don't need
|
||||||
@@ -324,6 +325,11 @@ moveloop_core(void)
|
|||||||
(void) dosearch0(1);
|
(void) dosearch0(1);
|
||||||
if (Warning)
|
if (Warning)
|
||||||
warnreveal();
|
warnreveal();
|
||||||
|
if (gw.were_changes) {
|
||||||
|
/* update innate intrinsics (mainly Drain_resistance) */
|
||||||
|
set_uasmon();
|
||||||
|
gw.were_changes = 0L;
|
||||||
|
}
|
||||||
mkot_trap_warn();
|
mkot_trap_warn();
|
||||||
dosounds();
|
dosounds();
|
||||||
do_storms();
|
do_storms();
|
||||||
|
|||||||
@@ -863,6 +863,7 @@ static const struct instance_globals_w g_init_w = {
|
|||||||
UNDEFINED_PTR, /* wportal */
|
UNDEFINED_PTR, /* wportal */
|
||||||
/* new */
|
/* new */
|
||||||
{ wdmode_traditional, NO_COLOR }, /* wsettings */
|
{ wdmode_traditional, NO_COLOR }, /* wsettings */
|
||||||
|
0L, /* were.c, allmain.c */
|
||||||
TRUE, /* havestate*/
|
TRUE, /* havestate*/
|
||||||
IVMAGIC /* w_magic to validate that structure layout has been preserved */
|
IVMAGIC /* w_magic to validate that structure layout has been preserved */
|
||||||
};
|
};
|
||||||
|
|||||||
+3
-2
@@ -16,6 +16,7 @@ were_change(struct monst *mon)
|
|||||||
&& !rn2(night() ? (flags.moonphase == FULL_MOON ? 3 : 30)
|
&& !rn2(night() ? (flags.moonphase == FULL_MOON ? 3 : 30)
|
||||||
: (flags.moonphase == FULL_MOON ? 10 : 50))) {
|
: (flags.moonphase == FULL_MOON ? 10 : 50))) {
|
||||||
new_were(mon); /* change into animal form */
|
new_were(mon); /* change into animal form */
|
||||||
|
gw.were_changes++;
|
||||||
if (!Deaf && !canseemon(mon)) {
|
if (!Deaf && !canseemon(mon)) {
|
||||||
const char *howler;
|
const char *howler;
|
||||||
|
|
||||||
@@ -39,9 +40,8 @@ were_change(struct monst *mon)
|
|||||||
}
|
}
|
||||||
} else if (!rn2(30) || Protection_from_shape_changers) {
|
} else if (!rn2(30) || Protection_from_shape_changers) {
|
||||||
new_were(mon); /* change back into human form */
|
new_were(mon); /* change back into human form */
|
||||||
|
gw.were_changes++;
|
||||||
}
|
}
|
||||||
/* update innate intrinsics (mainly Drain_resistance) */
|
|
||||||
set_uasmon(); /* new_were() doesn't do this */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@@ -203,6 +203,7 @@ you_were(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
(void) polymon(u.ulycn);
|
(void) polymon(u.ulycn);
|
||||||
|
gw.were_changes++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
Reference in New Issue
Block a user