diff options
| author | Simon Robertshaw <simon@hardwired.org.uk> | 2011-04-26 15:18:43 (GMT) |
|---|---|---|
| committer | Simon Robertshaw <simon@hardwired.org.uk> | 2011-04-26 15:18:43 (GMT) |
| commit | 75d5cc3d049a42c63254b4a4810447955398cf22 (patch) | |
| tree | 35bef9864005d852c40636dcc5a08507c5e95fec /src | |
| parent | 061d6ba7afb3c03b35f77ff59d1b70f8076bd6ca (diff) | |
| download | powder-75d5cc3d049a42c63254b4a4810447955398cf22.zip powder-75d5cc3d049a42c63254b4a4810447955398cf22.tar.gz | |
Fix for non-diff mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/air.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -56,6 +56,8 @@ void update_grav(void) } } } + if(!changed) + goto fin; memset(th_gravy, 0, sizeof(th_gravy)); memset(th_gravx, 0, sizeof(th_gravx)); #endif @@ -65,7 +67,7 @@ void update_grav(void) if (th_ogravmap[i][j] != th_gravmap[i][j]) { #else - if ((th_gravmap[i][j] > 0.0001f || th_gravmap[i][j]<-0.0001f) && changed) //Only calculate with populated or changed cells. + if (th_gravmap[i][j] > 0.0001f || th_gravmap[i][j]<-0.0001f) //Only calculate with populated or changed cells. { #endif for (y = 0; y < YRES / CELL; y++) { @@ -85,6 +87,7 @@ void update_grav(void) } } } +fin: memcpy(th_ogravmap, th_gravmap, sizeof(th_gravmap)); memset(th_gravmap, 0, sizeof(th_gravmap)); } |
