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.
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
staticfn void moveloop_preamble(boolean);
|
staticfn void moveloop_preamble(boolean);
|
||||||
staticfn void u_calc_moveamt(int);
|
staticfn void u_calc_moveamt(int);
|
||||||
|
|
||||||
staticfn void maybe_do_tutorial(void);
|
staticfn void maybe_do_tutorial(void);
|
||||||
#ifdef POSITIONBAR
|
#ifdef POSITIONBAR
|
||||||
staticfn void do_positionbar(void);
|
staticfn void do_positionbar(void);
|
||||||
@@ -511,11 +512,6 @@ moveloop_core(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CLIPPING
|
|
||||||
/* just before rhack */
|
|
||||||
cliparound(u.ux, u.uy);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
u.umoved = FALSE;
|
u.umoved = FALSE;
|
||||||
|
|
||||||
if (gm.multi > 0) {
|
if (gm.multi > 0) {
|
||||||
@@ -546,6 +542,11 @@ moveloop_core(void)
|
|||||||
|
|
||||||
if (gv.vision_full_recalc)
|
if (gv.vision_full_recalc)
|
||||||
vision_recalc(0); /* vision! */
|
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() */
|
/* when running in non-tport mode, this gets done through domove() */
|
||||||
if ((!svc.context.run || flags.runmode == RUN_TPORT)
|
if ((!svc.context.run || flags.runmode == RUN_TPORT)
|
||||||
&& (gm.multi && (!svc.context.travel ? !(gm.multi % 7)
|
&& (gm.multi && (!svc.context.travel ? !(gm.multi % 7)
|
||||||
|
|||||||
Reference in New Issue
Block a user