Skip to content

Commit

Permalink
Clarify comment about why tiny isn't checked for, remove obsolete com…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
harakka committed Nov 3, 2024
1 parent 5dc278a commit 23bab5b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion src/map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5481,7 +5481,6 @@ std::pair<item *, tripoint_bub_ms> map::_add_item_or_charges( const tripoint_bub
std::vector<tripoint_bub_ms> tiles = closest_points_first( pos, max_dist );
tiles.erase( tiles.begin() ); // we already tried this position
const int max_path_length = 4 * max_dist;
// TODO need to make creature size nullable so it can be ignored when not pathing for creature
const pathfinding_settings setting( 0, max_dist, max_path_length, 0, false, false, true, false,
false, false );
for( const tripoint_bub_ms &e : tiles ) {
Expand Down
2 changes: 1 addition & 1 deletion src/pathfinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ int map::cost_to_pass( const tripoint_bub_ms &cur, const tripoint_bub_ms &p,
return PF_IMPASSABLE;
}

// what to do with p_special & PathfindingFlag::RestrictTiny?
// RestrictTiny isn't checked since it's unclear how it would actually work as there's no category smaller than tiny
if( settings.size && (
( p_special & PathfindingFlag::RestrictSmall && settings.size > creature_size::tiny ) ||
( p_special & PathfindingFlag::RestrictMedium && settings.size > creature_size::small ) ||
Expand Down

0 comments on commit 23bab5b

Please sign in to comment.