From 1ca15d99ff125c52c4bcb4f63d1f2e5ee817c0de Mon Sep 17 00:00:00 2001 From: Ingo Paschke Date: Mon, 23 Mar 2026 20:46:31 +0100 Subject: [PATCH] Fix clipping: move cliparound after vision_recalc cliparound() was called before rhack(), triggering a map redraw with stale vision data followed by a second correct redraw. Move it after vision_recalc() so the map is redrawn once with correct data. --- src/allmain.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/allmain.c b/src/allmain.c index 2db536e5e..4dd27680c 100644 --- a/src/allmain.c +++ b/src/allmain.c @@ -13,6 +13,7 @@ staticfn void moveloop_preamble(boolean); staticfn void u_calc_moveamt(int); + staticfn void maybe_do_tutorial(void); #ifdef POSITIONBAR staticfn void do_positionbar(void); @@ -511,11 +512,6 @@ moveloop_core(void) return; } -#ifdef CLIPPING - /* just before rhack */ - cliparound(u.ux, u.uy); -#endif - u.umoved = FALSE; if (gm.multi > 0) { @@ -546,6 +542,11 @@ moveloop_core(void) if (gv.vision_full_recalc) vision_recalc(0); /* vision! */ +#ifdef CLIPPING + /* after rhack() and vision_recalc() so that the map is redrawn + once with correct vision data, not twice (overshoot+correct) */ + cliparound(u.ux, u.uy); +#endif /* when running in non-tport mode, this gets done through domove() */ if ((!svc.context.run || flags.runmode == RUN_TPORT) && (gm.multi && (!svc.context.travel ? !(gm.multi % 7)