SRL Archive - Reflection Development

function r_WebWalk(T: TTile): Boolean; - Modification.


Home

2011-04-28 05:26:04

Hello, as some of you might have noticed that if r_WebWalk is called and your Currentposition is near your destination it will fail. Well this little modification will call first If tileOnMM then walk to Destination, if not it will start generating those Blind points.

Easy fix. But aren't them all :P

function r_WebWalk(T: TTile): Boolean;
var
I: Integer;
M, P: TPoint;
CTRLPoints: TPointArray;
begin
P := TileToPoint(T);
if TileOnMM(P) then begin
WalkToTile(P, 0, 10)
Result := True;
Exit;
end
else
repeat
M := GetMyPos;
CtrlPoints := r_WindPath(M.x, M.y, P.X, P.Y, 5.0, 2.5, 0.0, 0.0, 4.5, 2.5);
for I := High(CtrlPoints) downto 0 do
if WalkToTile(Tile(CtrlPoints[i].x, CtrlPoints[i].y), 0, 10) then
begin
Result := I = High(CtrlPoints);
Break;
end;
until (Result);
end;


EDIT: Yes it can be make shorter mabey couple lines :P But does it really matter?

~Home

Harry

2011-04-28 07:26:55

The issue lies with WalkToTile, if I recall correctly.

Home

2011-04-28 07:29:08

From: Harry
The issue lies with WalkToTile, if I recall correctly.


From my experience it's in r_WebWalk.

Of course i can be wrong. But this "Fix" works for me.


~Home

Harry

2011-04-28 07:58:19

From: Home
From my experience it's in r_WebWalk.

Well I meant the (indirect) problem is because of WalkToTile. Though I could be wrong; I haven't touched it in a while, but IIRC that's the core issue.

Jakkle

2011-05-26 09:43:59

Could this fix be commited please ? I use webwalk alot and found this is my only problem with it. I can't see the simba code very well either atm as it seems to of messed up on the site. Would be very grateful if you could :)

footballjds

2011-05-26 11:38:01

whats with all the *******************************************************************************************************************************************************
Astrix's?

tom99

2011-05-26 12:06:43

*** is because of a workaround they had to do to prevent vB exploit hijacking PM boxes. But it'll be fixed i tihnk.

footballjds

2011-05-26 12:07:39

From: tom99
this looks great but why the ****.


I think it has to do with the simba code tags?

Dgby714

2011-05-26 12:07:39

From: footballjds
whats with all the *******************************************************************************************************************************************************
Astrix's?


Bug in vB.

Heres a Key.

***40; = (
***41; = )