transform_save should check wall coordinates against size in blocks, not the actual size
Fixes crash when rotating a section of wall that is wider than YRES
This commit is contained in:
parent
edcf6d7b2f
commit
ff6aa0227d
@ -2275,7 +2275,7 @@ void *transform_save(void *odata, int *size, matrix2d transform, vector2d transl
|
|||||||
pos = v2d_add(m2d_multiply_v2d(transform,pos),translate);
|
pos = v2d_add(m2d_multiply_v2d(transform,pos),translate);
|
||||||
nx = pos.x/CELL;
|
nx = pos.x/CELL;
|
||||||
ny = pos.y/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;
|
continue;
|
||||||
if (bmapo[y][x])
|
if (bmapo[y][x])
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user