Clear air properly

This commit is contained in:
Simon Robertshaw 2012-01-26 16:23:18 +00:00
parent d520a70acf
commit 824d3c069b

View File

@ -872,11 +872,11 @@ void Simulation::clear_sim(void)
parts_lastActiveIndex = 0; parts_lastActiveIndex = 0;
memset(pmap, 0, sizeof(pmap)); memset(pmap, 0, sizeof(pmap));
if(pv) if(pv)
memset(pv, 0, sizeof(pv)); memset(pv, 0, (XRES/CELL) * (YRES/CELL)*sizeof(float));
if(vx) if(vx)
memset(vx, 0, sizeof(vx)); memset(vx, 0, (XRES/CELL) * (YRES/CELL)*sizeof(float));
if(vy) if(vy)
memset(vy, 0, sizeof(vy)); memset(vy, 0, (XRES/CELL) * (YRES/CELL)*sizeof(float));
if(fvx) if(fvx)
memset(fvx, 0, sizeof(fvx)); memset(fvx, 0, sizeof(fvx));
if(fvy) if(fvy)