Quote:
function TSPSArea.getPlayerPos(): TPoint; override;
var
t, foundMatches, bmpW, bmpH: integer;
bmpMinimap: TMufasaBitmap;
smallMap: T3DIntegerArray;
p: TPoint;
searches: extended;
const
sleep_time = 250;
begin
if (_PLAYER_POS_TIMER + sleep_time) > getSystemTime then
exit(_PLAYER_POS_GLOBAL);
result := [-1, -1];
if (not self.isSetup) then
begin
print('Unable to get players postion, sps isn''t setup', TDebug.ERROR);
exit();
end;
if (not isLoggedIn()) then
exit();
t := getSystemTime();
if (not spsAnyAngle) then
begin
if (inRange(minimap.getAngleDegrees(), 8, 352)) then
minimap.setAngle(MM_DIRECTION_NORTH);
end else
bmpW := bmpMinimap.getWidth();
bmpH := 500;
//SPS_BitmapToMap(bmpMinimap, self._accuracy, smallMap);
//foundMatches := SPS_FindMapInMap(p.x, p.y, self.__areaMap, smallMap, self._tolerance);
//searches := ((bmpW / self._accuracy) * (bmpH / self._accuracy));
bmpMinimap.free();
if ((foundMatches / searches) > self._minMatchPercent) then
begin
result.x := (p.x * self._accuracy + (bmpW div 2));
result.y := (p.y * self._accuracy + (bmpW div 2));
_PLAYER_POS_GLOBAL := result;
end else
You HAVE TO rotate camera manually so that you can see the rift on the screen.