diff --git a/src/simulation/Gravity.cpp b/src/simulation/Gravity.cpp index 4d5bbe43f..a2670de00 100755 --- a/src/simulation/Gravity.cpp +++ b/src/simulation/Gravity.cpp @@ -55,6 +55,7 @@ void Gravity::gravity_init() gravx = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); gravp = (float *)calloc((XRES/CELL)*(YRES/CELL), sizeof(float)); gravmask = (unsigned int *)calloc((XRES/CELL)*(YRES/CELL), sizeof(unsigned)); + obmap = (unsigned char (*)[XRES/CELL])calloc((XRES/CELL)*(YRES/CELL), sizeof(unsigned char)); } void Gravity::gravity_cleanup() @@ -291,7 +292,7 @@ void Gravity::update_grav() break; for (x=0; x