naev 0.11.5
player_autonav.c File Reference

Contains all the player autonav related stuff. More...

#include "player.h"
#include "ai.h"
#include "array.h"
#include "board.h"
#include "conf.h"
#include "map.h"
#include "pause.h"
#include "pilot.h"
#include "pilot_ew.h"
#include "map_overlay.h"
#include "ndata.h"
#include "nlua.h"
#include "nlua_vec2.h"
#include "nlua_pilot.h"
#include "nlua_spob.h"
#include "nlua_system.h"
#include "sound.h"
#include "space.h"
#include "toolkit.h"

Go to the source code of this file.

Functions

static int player_autonavSetup (void)
 Prepares the player to enter autonav.
 
int player_autonavInit (void)
 
void player_autonavResetSpeed (void)
 Resets the game speed.
 
void player_autonavStart (void)
 Starts autonav.
 
void player_autonavEnd (void)
 Ends the autonav.
 
void player_autonavStartWindow (unsigned int wid, const char *str)
 Starts autonav and closes the window.
 
void player_autonavPos (double x, double y)
 Starts autonav with a local position destination.
 
void player_autonavSpob (const char *name, int tryland)
 Starts autonav with a spob destination.
 
void player_autonavPil (unsigned int p)
 Starts autonav with a pilot to follow.
 
void player_autonavBoard (unsigned int p)
 Starts autonav with a pilot to board.
 
void player_autonavAbort (const char *reason)
 Aborts autonav.
 
void player_autonavReset (double s)
 
void player_thinkAutonav (Pilot *pplayer, double dt)
 Handles autonav thinking.
 
void player_updateAutonav (double dt)
 Updates the player's autonav.
 
void player_autonavEnter (void)
 

Variables

static nlua_env autonav_env = LUA_NOREF
 
static int func_system = LUA_NOREF
 
static int func_spob = LUA_NOREF
 
static int func_pilot = LUA_NOREF
 
static int func_board = LUA_NOREF
 
static int func_pos = LUA_NOREF
 
static int func_reset = LUA_NOREF
 
static int func_end = LUA_NOREF
 
static int func_abort = LUA_NOREF
 
static int func_think = LUA_NOREF
 
static int func_update = LUA_NOREF
 
static int func_enter = LUA_NOREF
 
static int autonav_ending = 0
 

Detailed Description

Contains all the player autonav related stuff.

Definition in file player_autonav.c.

Function Documentation

◆ player_autonavAbort()

void player_autonavAbort ( const char * reason)

Aborts autonav.

Parameters
reasonHuman-readable string describing abort condition.

Definition at line 282 of file player_autonav.c.

◆ player_autonavBoard()

void player_autonavBoard ( unsigned int p)

Starts autonav with a pilot to board.

Definition at line 255 of file player_autonav.c.

◆ player_autonavEnd()

void player_autonavEnd ( void )

Ends the autonav.

Definition at line 158 of file player_autonav.c.

◆ player_autonavEnter()

void player_autonavEnter ( void )

Definition at line 412 of file player_autonav.c.

◆ player_autonavInit()

int player_autonavInit ( void )

Definition at line 55 of file player_autonav.c.

◆ player_autonavPil()

void player_autonavPil ( unsigned int p)

Starts autonav with a pilot to follow.

Definition at line 236 of file player_autonav.c.

◆ player_autonavPos()

void player_autonavPos ( double x,
double y )

Starts autonav with a local position destination.

Definition at line 193 of file player_autonav.c.

◆ player_autonavReset()

void player_autonavReset ( double s)

Definition at line 315 of file player_autonav.c.

◆ player_autonavResetSpeed()

void player_autonavResetSpeed ( void )

Resets the game speed.

Definition at line 92 of file player_autonav.c.

◆ player_autonavSetup()

static int player_autonavSetup ( void )
static

Prepares the player to enter autonav.

Returns
0 on success, -1 on failure (disabled, etc.)

Definition at line 140 of file player_autonav.c.

◆ player_autonavSpob()

void player_autonavSpob ( const char * name,
int tryland )

Starts autonav with a spob destination.

Definition at line 213 of file player_autonav.c.

◆ player_autonavStart()

void player_autonavStart ( void )

Starts autonav.

Definition at line 100 of file player_autonav.c.

◆ player_autonavStartWindow()

void player_autonavStartWindow ( unsigned int wid,
const char * str )

Starts autonav and closes the window.

Definition at line 182 of file player_autonav.c.

◆ player_thinkAutonav()

void player_thinkAutonav ( Pilot * pplayer,
double dt )

Handles autonav thinking.

Parameters
pplayerPlayer doing the thinking.
dtCurrent delta tick.

Definition at line 331 of file player_autonav.c.

◆ player_updateAutonav()

void player_updateAutonav ( double dt)

Updates the player's autonav.

Parameters
dtCurrent delta tick (should be real delta tick, not game delta tick).

Definition at line 352 of file player_autonav.c.

Variable Documentation

◆ autonav_ending

int autonav_ending = 0
static

Definition at line 154 of file player_autonav.c.

◆ autonav_env

nlua_env autonav_env = LUA_NOREF
static

Autonav environment.

Definition at line 37 of file player_autonav.c.

◆ func_abort

int func_abort = LUA_NOREF
static

Definition at line 45 of file player_autonav.c.

◆ func_board

int func_board = LUA_NOREF
static

Definition at line 41 of file player_autonav.c.

◆ func_end

int func_end = LUA_NOREF
static

Definition at line 44 of file player_autonav.c.

◆ func_enter

int func_enter = LUA_NOREF
static

Definition at line 48 of file player_autonav.c.

◆ func_pilot

int func_pilot = LUA_NOREF
static

Definition at line 40 of file player_autonav.c.

◆ func_pos

int func_pos = LUA_NOREF
static

Definition at line 42 of file player_autonav.c.

◆ func_reset

int func_reset = LUA_NOREF
static

Definition at line 43 of file player_autonav.c.

◆ func_spob

int func_spob = LUA_NOREF
static

Definition at line 39 of file player_autonav.c.

◆ func_system

int func_system = LUA_NOREF
static

Definition at line 38 of file player_autonav.c.

◆ func_think

int func_think = LUA_NOREF
static

Definition at line 46 of file player_autonav.c.

◆ func_update

int func_update = LUA_NOREF
static

Definition at line 47 of file player_autonav.c.