Skip to content

Commit

Permalink
Some changes which make GRVT work better
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Jul 3, 2014
1 parent 70676ab commit 4b4eb1a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/simulation/Gravity.cpp
Expand Up @@ -144,6 +144,7 @@ void Gravity::update_grav_async()
//memset(th_gravy, 0, XRES*YRES*sizeof(float));
//memset(th_gravx, 0, XRES*YRES*sizeof(float));
//memset(th_gravp, 0, XRES*YRES*sizeof(float));
if (!grav_fft_status) grav_fft_init();
while(!thread_done){
if(!done){
update_grav();
Expand Down Expand Up @@ -301,7 +302,6 @@ void Gravity::update_grav()
if(changed)
{
th_gravchanged = 1;
if (!grav_fft_status) grav_fft_init();

//copy gravmap into padded gravmap array
for (y=0; y<YRES/CELL; y++)
Expand Down
2 changes: 1 addition & 1 deletion src/simulation/Simulation.cpp
Expand Up @@ -4236,7 +4236,7 @@ void Simulation::update_particles_i(int start, int inc)
clear_y = (int)(clear_yf+0.5f);
break;
}
if (fin_x<CELL || fin_y<CELL || fin_x>=XRES-CELL || fin_y>=YRES-CELL || pmap[fin_y][fin_x] || (bmap[fin_y/CELL][fin_x/CELL] && (bmap[fin_y/CELL][fin_x/CELL]==WL_DESTROYALL || !eval_move(t,fin_x,fin_y,NULL))))
if (!eval_move(t, fin_x, fin_y, NULL))
{
// found an obstacle
clear_xf = fin_xf-dx;
Expand Down

0 comments on commit 4b4eb1a

Please sign in to comment.