Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

* More correctness and documentation for approachAutonav.

commit e74988b3e5849adf306217d3735b265575b74223 1 parent 2d30ec5
Edgar Simo-Serra authored

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. +5 3 src/player_autonav.c
8 src/player_autonav.c
@@ -38,7 +38,7 @@ static double autopause_timer = 0.; /**< Avoid autopause if the player just unpa
38 38 */
39 39 static void player_autonavSetup (void);
40 40 static void player_autonav (void);
41   -static int player_autonavApproach( Vector2d *pos, double *dist2, int count_target );
  41 +static int player_autonavApproach( const Vector2d *pos, double *dist2, int count_target );
42 42 static int player_autonavBrake (void);
43 43
44 44
@@ -354,10 +354,12 @@ static void player_autonav (void)
354 354 /**
355 355 * @brief Handles approaching a position with autonav.
356 356 *
357   - * @param pos Position to go to.
  357 + * @param[in] pos Position to go to.
  358 + * @param[out] dist2 Square distance left to target.
  359 + * @param count_target If 1 it subtracts the braking distance from dist2. Otherwise it returns the full distance.
358 360 * @return 1 on completion.
359 361 */
360   -static int player_autonavApproach( Vector2d *pos, double *dist2, int count_target )
  362 +static int player_autonavApproach( const Vector2d *pos, double *dist2, int count_target )
361 363 {
362 364 double d, t, vel, dist;
363 365

0 comments on commit e74988b

Please sign in to comment.
Something went wrong with that request. Please try again.