transform_save should check wall coordinates against size in blocks, not the actual size ff6aa0227d

This commit is contained in:
Simon Robertshaw 2012-04-17 16:09:37 +01:00
parent 027833fe20
commit f4e2d188c2

View File

@ -819,7 +819,7 @@ void *Simulation::transform_save(void *odata, int *size, matrix2d transform, vec
pos = v2d_add(m2d_multiply_v2d(transform,pos),translate);
nx = pos.x/CELL;
ny = pos.y/CELL;
if (nx<0 || nx>=nw || ny<0 || ny>=nh)
if (nx<0 || nx>=nw/CELL || ny<0 || ny>=nh/CELL)
continue;
if (bmapo[y][x])
{