Version 5.8 hotfix with tweak to collision detection at the top boarder.

This commit is contained in:
Dave Bernazzani 2024-10-20 17:29:03 -04:00
parent 222366f92f
commit 9cf739bd9a
2 changed files with 4 additions and 5 deletions

Binary file not shown.

View File

@ -1253,12 +1253,11 @@ ITCM_CODE BOOL AY38900::mobsCollide(int mobNum0, int mobNum1)
{ {
if (((mobBuffers[mobNum0][offsetYr0 + y] << offsetXr0) & (mobBuffers[mobNum1][offsetYr1 + y] << offsetXr1)) != 0) if (((mobBuffers[mobNum0][offsetYr0 + y] << offsetXr0) & (mobBuffers[mobNum1][offsetYr1 + y] << offsetXr1)) != 0)
{ {
// --------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------
// Make sure the vertical area of this overlap is visible on screen ... otherwise no collision // Make sure the vertical area of this overlap is visible on screen ... otherwise no collision
// Since we've already determined a collision, we only need to check one of the MOB rectangles to see // In theory, we should check outside the bottom of screen too but we're keeping in simple and fast.
// if it is off-screen as the other one would be likewise... In theory, we should check outside bottom too. // -------------------------------------------------------------------------------------------------
// --------------------------------------------------------------------------------------------------------- if ((startingY + (y/2) + verticalOffset) >= 0) return TRUE;
if ((r0->y + ((offsetYr0/2) + (y/2) + verticalOffset)) >= 0) return TRUE;
} }
} }