Skip to content

Commit

Permalink
fix: fix map maker with the removal of the combat regions
Browse files Browse the repository at this point in the history
  • Loading branch information
Torwent committed Jan 3, 2024
1 parent 1f8e40d commit 2e70211
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
10 changes: 2 additions & 8 deletions osr/handlers/combathandler.simba
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ end;



function TRSCombatHandler.FindTaggedMonsters(dots: TPointArray; offset: TPoint = [2, 2]): TPointArray;
function TRSCombatHandler.FindTaggedMonsters(dots: TPointArray; offset: TPoint = [0, 0]): TPointArray;
var
i, j, hi: Int32;
p: TPoint;
Expand All @@ -711,7 +711,6 @@ var
b: TBox;
rect: TRectangle;
angle: Double;
debugATPA: T2DPointArray;
begin
p := Minimap.Center();
angle := Minimap.GetCompassAngle(False);
Expand All @@ -731,8 +730,6 @@ begin
b := b.Expand(4);
rect := b.ToRectangle().Rotate(angle);

debugATPA += rect.ToTPA.Connect;

hi := High(rotatedDots);
for j := 0 to hi do
if rect.Contains(rotatedDots[j]) then
Expand All @@ -745,11 +742,8 @@ begin
end;

if Result = last then
begin
debugATPA += Result;
Debug(atpa[0]);
Exit;
end;

last := Result;
end;
end;
Expand Down
1 change: 0 additions & 1 deletion tools/map_maker.simba
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ end;
function TRSMapMaker.GetSetupString(): String;
begin
Result := LINEENDING + ' RSBankRegions.Setup();' + LINEENDING;
Result += ' RSCombatRegions.Setup();' + LINEENDING;
end;


Expand Down
9 changes: 6 additions & 3 deletions utils/rsregions/rsregions.simba
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ type RSRegions = record(TSRLBaseRecord) class var
JORMUNGANDS_PRISON: TBox;
RELLEKKA: TBox;
UNGAEL: TBox;
EVIL_CHICKEN_LAIR: TBox;
end;

begin
Expand Down Expand Up @@ -211,6 +212,7 @@ begin
RSRegions.JORMUNGANDS_PRISON := [0, 5377, 448, 5828];
RSRegions.RELLEKKA := [5819, 1562, 6441, 2228];
RSRegions.UNGAEL := [4933, 1622, 5284, 1966];
RSRegions.EVIL_CHICKEN_LAIR := [10156, 4116, 10553, 4494];

RSNamedRegionsArray := [
['Abyss', RSRegions.ABYSS],
Expand Down Expand Up @@ -313,9 +315,10 @@ begin
['Nardah', RSRegions.NARDAH],
['Pyramid Plunder Entrance', RSRegions.PYRAMID_PLUNDER_ENTRANCE],
['Jormungand''s Prison', RSRegions.JORMUNGANDS_PRISON],
['Relleka', RSRegions.RELLEKKA],
['Ungael', RSRegions.UNGAEL]
['Rellekka', RSRegions.RELLEKKA],
['Ungael', RSRegions.UNGAEL],
['Evil Chicken Lair', RSRegions.EVIL_CHICKEN_LAIR]
];

RSBankRegions.Setup();
end;
end;

0 comments on commit 2e70211

Please sign in to comment.