Skip to content

Commit

Permalink
path manager TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
Brambor committed Dec 9, 2024
1 parent e399025 commit 1b14c49
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/path_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ int path::avatar_closest_i_approximate() const
// Asuming the path tiles are at most (1, 1, 1) apart,
// we can skip as many tiles, as the curent tile is far from the `avatar_pos`.
int diff = square_dist( *it, avatar_pos );
// TODO north is closer than northeast && north is closer than z-1
if( diff < closest_dist ) {
closest_i = it - recorded_path.begin();
if( diff == 0 ) {
Expand All @@ -330,6 +331,11 @@ int path::avatar_closest_i_approximate() const
it += diff;
}
return closest_i;
// TODO remove start and end distance?
/*
| name | distance | length |
| start | end | start | end | closest | |
*/
}

void path::serialize( JsonOut &jsout )
Expand Down

0 comments on commit 1b14c49

Please sign in to comment.