From 37d687e4e91757768b9c2f3c7fdc709cd3e4a729 Mon Sep 17 00:00:00 2001 From: Mitchell Richters Date: Thu, 20 Aug 2020 22:17:28 +1000 Subject: [PATCH] - Blood: Repair regression in `VectorScan()` from 266364fc2e0d5eef9458f5ddc677adff88458b13 causing demo regressions and other game issues. Fixes #216. --- source/blood/src/gameutil.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blood/src/gameutil.cpp b/source/blood/src/gameutil.cpp index bd2b191d2..6944d7582 100644 --- a/source/blood/src/gameutil.cpp +++ b/source/blood/src/gameutil.cpp @@ -505,7 +505,7 @@ int VectorScan(spritetype *pSprite, int nOffset, int nZOffset, int dx, int dy, i int check1 = ((y1 - pOther->y)*dx - (x1 - pOther->x)*dy) / ksqrt(dx*dx+dy*dy); dassert(width > 0); int width2 = scale(check1, tileWidth(nPicnum), width); - int nOffset = tileTopOffset(nPicnum); + int nOffset = tileLeftOffset(nPicnum); width2 += nOffset + tileWidth(nPicnum) / 2; if (width2 >= 0 && width2 < tileWidth(nPicnum)) {