X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=sprite.c;h=809547b29431a96c861b3d343d95dcc7ab68d11e;hp=aadf22d878fa42dea90d17cdca3bf5f88644e4d5;hb=cffdedca2aba899f3e0f8b98f67b9125edf6b5a5;hpb=5b6e786d0bc01f9f278f75afebcbc0947556fbce diff --git a/sprite.c b/sprite.c index aadf22d..809547b 100644 --- a/sprite.c +++ b/sprite.c @@ -292,6 +292,8 @@ int pixel_collide(Sprite *s, int x, int y) { uint32_t pmask; + + if(!COLLIDES(s)) return false; if(x < s->x || y < s->y || x >= s->x + s->w || y >= s->y + s->h) return 0;