unit respawns;

interface

uses constants, global, records, pathfinding, variables;

type
  TRespawn = class
    map_x, map_y : integer;
    path : RPath;
  public
    constructor Create(mx, my : integer);
    procedure RefindPath;
  end;

var total_respawns : integer;
    gRespawns : array[1..max_respawns] of TRespawn;

implementation

constructor TRespawn.Create(mx, my : integer);
begin
map_x := mx; map_y := my;
with pathmap.map[map_x, map_y] do
  begin walk := true; build := false; end;
end;

procedure TRespawn.RefindPath;
begin
path := FindPath(map_x, map_y, base_x, base_y, pathmap);
end;

end.
