more coord calc fixes

develop
mizipzor 2010-02-17 20:38:15 +01:00
parent 6f4f406b89
commit 531e10683d
1 changed files with 3 additions and 3 deletions

@ -61,7 +61,7 @@ struct DigTarget
{
int source_distance; // the distance to the source coords, used for sorting
int x, y, z;
bool operator<(const DigTarget& o) { return source_distance < o.source_distance; }
bool operator<(const DigTarget& o) const { return source_distance < o.source_distance; }
};
int dig(DFHack::API& DF,
@ -170,8 +170,8 @@ int dig(DFHack::API& DF,
int grid_y = (*i).y/16;
int z = (*i).z;
int local_x = (*i).x-grid_x;
int local_y = (*i).y-grid_y;
int local_x = (*i).x%grid_x;
int local_y = (*i).y%grid_y;
cout << "designating at " << grid_x+local_x << " " << grid_y+local_y << " " << (*i).z;
cout << ", " << (*i).source_distance << " tiles to source" << endl;