Skip to content

Commit

Permalink
clang-tidy fix (#76719)
Browse files Browse the repository at this point in the history
Co-authored-by: mqrause <[email protected]>
  • Loading branch information
mqrause and mqrause authored Sep 29, 2024
1 parent 5efdf7a commit 3901005
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/teleport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ bool teleport::teleport( Creature &critter, int min_distance, int max_distance,
do {
int rangle = rng( 0, 360 );
int rdistance = rng( min_distance, max_distance );
int x = origin.x() + rdistance * std::cos( rangle );
int y = origin.y() + rdistance * std::sin( rangle );
new_pos = tripoint_bub_ms( x, y, new_pos.z() );
new_pos.x() = origin.x() + rdistance * std::cos( rangle );
new_pos.y() = origin.y() + rdistance * std::sin( rangle );
tries++;
} while( here.impassable( new_pos ) && tries < 20 );
return teleport_to_point( critter, new_pos, safe, add_teleglow );
Expand Down

0 comments on commit 3901005

Please sign in to comment.