Fix SPHITSP
This commit is contained in:
@@ -162,15 +162,15 @@ struct SpriteCollision
|
|||||||
{
|
{
|
||||||
int x2 = (data.linkx + sx);
|
int x2 = (data.linkx + sx);
|
||||||
int y2 = (data.linky + sy);
|
int y2 = (data.linky + sy);
|
||||||
if(x <= x2 && y <= y2 && x + w >= x2 && y + h >= y2)
|
if(x <= x2 && y <= y2 && x + w > x2 && y + h > y2)
|
||||||
return true;
|
return true;
|
||||||
int w2 = cast(int)(data.w * data.scalex);
|
int w2 = cast(int)(data.w * data.scalex);
|
||||||
int h2 = cast(int)(data.h * data.scaley);
|
int h2 = cast(int)(data.h * data.scaley);
|
||||||
if(x <= x2 + w2 && y <= y2 + h2 && x + w >= x2 + w2 && y + h >= y2 + h2)
|
if(x < x2 + w2 && y < y2 + h2 && x + w >= x2 + w2 && y + h >= y2 + h2)
|
||||||
return true;
|
return true;
|
||||||
if(x <= x2 + w2 && y <= y2 && x + w >= x2 + w2 && y + h >= y2)
|
if(x < x2 + w2 && y <= y2 && x + w >= x2 + w2 && y + h >= y2)
|
||||||
return true;
|
return true;
|
||||||
if(x <= x2 && y <= y2 + h2 && x + w >= x2 && y + h >= y2 + h2)
|
if(x <= x2 && y < y2 + h2 && x + w >= x2 && y + h >= y2 + h2)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user