Move sanity checking to start of main loop

... just after clearing the object bypasses, as some
of the monster movement code may use object bypass flags.
This commit is contained in:
Pasi Kallinen
2021-09-05 10:14:12 +03:00
parent c97e3e1db7
commit e813cf5b05

View File

@@ -156,6 +156,9 @@ moveloop_core(void)
if (g.context.bypasses)
clear_bypasses();
if (iflags.sanity_check || iflags.debug_fuzzer)
sanity_check();
if (g.context.move) {
/* actual time passed */
g.youmonst.movement -= NORMAL_SPEED;
@@ -447,9 +450,6 @@ moveloop_core(void)
return;
}
if (iflags.sanity_check || iflags.debug_fuzzer)
sanity_check();
#ifdef CLIPPING
/* just before rhack */
cliparound(u.ux, u.uy);