deathbyvirus
2008-08-07 14:59:34
well this function is really simple and is meant for reflection, it just reverses a path (TPointArray) which is incredibly useful for walking back from anything really, any script that uses a path to get to a location and then you need to get back to it, such as from a bank to mining spot, and then back again, instead of having the 2 paths, just use 1 and reverse it for the way back, anyways yea, i kinda over explained that haha
i don't mean to be pushy but i really think this should be in the svn, or atleast something like it because its really useful
{*******************************************************************************
function ReversePath(Path: TPointArray): TPointArray;
By: DeathByVirus
Description: Reverses the points in a path, useful for walking back from a
location
*******************************************************************************}
function ReversePath(Path: TPointArray): TPointArray;
var
i: integer;
begin
if Length(path) < 2 then Exit;
SetLength(Result, Length(Path));
for i := 0 to high(Path) do begin
Result[i] := Path[high(Path) - i];
end;
end;
i don't mean to be pushy but i really think this should be in the svn, or atleast something like it because its really useful