summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2011-07-24 13:31:24 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2011-07-24 13:31:24 (GMT)
commite7907f9ea3795ebb50dc77ef9b129eb2e12abc39 (patch)
treeb54aef99f882078e6dd5229d5121ff3ab1b09b47 /src
parentfbb72e4f324334266e034c0118c14eb16bfbc373 (diff)
downloadpowder-e7907f9ea3795ebb50dc77ef9b129eb2e12abc39.zip
powder-e7907f9ea3795ebb50dc77ef9b129eb2e12abc39.tar.gz
Prevent gravity vel-maps from flipping when paused
Diffstat (limited to 'src')
-rw-r--r--src/main.c25
1 files changed, 13 insertions, 12 deletions
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 &&