[Bug report] CompareBBEntries not functioning properly

The decorator does not function as intended when the value of the first entry is less than the second entry. It always fails as UBTDecorator_CompareBBEntries::CalculateRawConditionValue() will always return false.

I’ve tracked down the problem and this is due to to the value of int32(Result) being compared to int32(Operator). When, first entry is less than the second entry, Result is equal to EBlackboardCompare::Less and int32(Result) is equal to -1. While int32(Operator) is equal to 0 when Operator is EBlackBoardEntryComparison::Equal and 1 when Operator is EBlackBoardEntryComparison::NotEqual. Therefore, int32(Operator) == int32(Result) always returns false.

I’ve a temporary fix if any one needs it:-

Replace the line inside UBTDecorator_CompareBBEntries::CalculateRawConditionValue()

return int32(Operator) == int32(Result);

with

return int32(Operator) == int32(Result == EBlackboardCompare::Less ? EBlackboardCompare::NotEqual : Result);