From d07b0a35ca327f3eabf47b16ece02946d80d429e Mon Sep 17 00:00:00 2001 From: Humza Shahid Date: Fri, 24 Jan 2025 02:12:04 +0000 Subject: [PATCH] amend minor regression bug: in 'canJump' function, check to make sure prevPlatform is lower than nextPlatform --- fcore/enemy-behaviour.sml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fcore/enemy-behaviour.sml b/fcore/enemy-behaviour.sml index 38dd3c3..0fa76e1 100644 --- a/fcore/enemy-behaviour.sml +++ b/fcore/enemy-behaviour.sml @@ -189,8 +189,9 @@ struct val {x = nPlatX, y = nPlatY, width = nPlatW, ...} = nextPlatform val nPlatFinishX = nPlatX + nPlatW in - isBetween (nPlatX, pPlatX, nPlatFinishX) - orelse isBetween (nPlatX, pPlatFinishX, nPlatFinishX) + (isBetween (nPlatX, pPlatX, nPlatFinishX) + orelse isBetween (nPlatX, pPlatFinishX, nPlatFinishX)) + andalso pPlatY > nPlatY end fun getJumpPatches (nextPlatform, platformTree, enemy, acc) =