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:16 +03:00
parent c97e3e1db7
commit e813cf5b05
+3 -3
View File
@@ -156,6 +156,9 @@ moveloop_core(void)
if (g.context.bypasses) if (g.context.bypasses)
clear_bypasses(); clear_bypasses();
if (iflags.sanity_check || iflags.debug_fuzzer)
sanity_check();
if (g.context.move) { if (g.context.move) {
/* actual time passed */ /* actual time passed */
g.youmonst.movement -= NORMAL_SPEED; g.youmonst.movement -= NORMAL_SPEED;
@@ -447,9 +450,6 @@ moveloop_core(void)
return; return;
} }
if (iflags.sanity_check || iflags.debug_fuzzer)
sanity_check();
#ifdef CLIPPING #ifdef CLIPPING
/* just before rhack */ /* just before rhack */
cliparound(u.ux, u.uy); cliparound(u.ux, u.uy);