From e7907f9ea3795ebb50dc77ef9b129eb2e12abc39 Mon Sep 17 00:00:00 2001 From: Simon Robertshaw Date: Sun, 24 Jul 2011 14:31:24 +0100 Subject: Prevent gravity vel-maps from flipping when paused diff --git a/src/main.c b/src/main.c index 3461483..a01fe85 100644 --- a/src/main.c +++ b/src/main.c @@ -1896,21 +1896,21 @@ int main(int argc, char *argv[]) memcpy(gravx, th_gravx, sizeof(gravx)); //Move the processed velocity maps to be used memcpy(gravp, th_gravp, sizeof(gravp)); - //Switch the full size gravmaps, we don't really need the two above any more - float *tmpf; - tmpf = gravyf; - gravyf = th_gravyf; - th_gravyf = tmpf; + if (!sys_pause||framerender){ //Only update if not paused + //Switch the full size gravmaps, we don't really need the two above any more + float *tmpf; + tmpf = gravyf; + gravyf = th_gravyf; + th_gravyf = tmpf; - tmpf = gravxf; - gravxf = th_gravxf; - th_gravxf = tmpf; + tmpf = gravxf; + gravxf = th_gravxf; + th_gravxf = tmpf; - tmpf = gravpf; - gravpf = th_gravpf; - th_gravpf = tmpf; + tmpf = gravpf; + gravpf = th_gravpf; + th_gravpf = tmpf; - if (!sys_pause||framerender){ //Only update if not paused grav_ready = 0; //Tell the other thread that we're ready for it to continue pthread_cond_signal(&gravcv); } @@ -2674,6 +2674,7 @@ int main(int argc, char *argv[]) } } + mx = x; my = y; if (b && !bq && x>=(XRES-19-new_message_len)*sdl_scale && -- cgit v0.9.2-21-gd62e