marpis
2011-12-22 15:16:42
Simba likes flaot numbers to actually have decimals, which GetHitsIn() didn't use so it rounded the numbers wrong.
Here's a fixed version:
To all you who wonder why a developer doesn't just commit it himself, I haven't had time to get to know git yet.
Here's a fixed version:
function GetHitsIn(Sx, Sy, x1, y1, x2, y2: Integer): TIntegerArray;
var
E: Extended;
I, H: Integer;
TBA : TBoxArray;
begin
TBA := FindAllHPBars(Sx, Sy, x1, y1, x2, y2);
SetArrayLength(Result, GetArrayLength(TBA));
H := High(TBA);
for I := 0 To H Do
begin
E := CountColorTolerance(56488, TBA[i].x1, TBA[i].y1, TBA[i].x2, TBA[i].y2, 43) / 60.0;
Result[i] := Round(100.0 * E);
end;
end;To all you who wonder why a developer doesn't just commit it himself, I haven't had time to get to know git yet.