Prevent gravity vel-maps from flipping when paused

This commit is contained in:
Simon Robertshaw 2011-07-24 14:31:24 +01:00
parent fbb72e4f32
commit e7907f9ea3

View File

@ -1896,6 +1896,7 @@ int main(int argc, char *argv[])
memcpy(gravx, th_gravx, sizeof(gravx)); //Move the processed velocity maps to be used memcpy(gravx, th_gravx, sizeof(gravx)); //Move the processed velocity maps to be used
memcpy(gravp, th_gravp, sizeof(gravp)); memcpy(gravp, th_gravp, sizeof(gravp));
if (!sys_pause||framerender){ //Only update if not paused
//Switch the full size gravmaps, we don't really need the two above any more //Switch the full size gravmaps, we don't really need the two above any more
float *tmpf; float *tmpf;
tmpf = gravyf; tmpf = gravyf;
@ -1910,7 +1911,6 @@ int main(int argc, char *argv[])
gravpf = th_gravpf; gravpf = th_gravpf;
th_gravpf = tmpf; 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 grav_ready = 0; //Tell the other thread that we're ready for it to continue
pthread_cond_signal(&gravcv); pthread_cond_signal(&gravcv);
} }
@ -2674,6 +2674,7 @@ int main(int argc, char *argv[])
} }
} }
mx = x; mx = x;
my = y; my = y;
if (b && !bq && x>=(XRES-19-new_message_len)*sdl_scale && if (b && !bq && x>=(XRES-19-new_message_len)*sdl_scale &&