21#ifndef HEADER_END_CONTROLLER_HPP
22#define HEADER_END_CONTROLLER_HPP
24#include "karts/controller/ai_base_lap_controller.hpp"
54 float m_max_handicap_accel;
63 float m_time_since_stuck;
76 void handleSteering(
float dt);
77 void handleRescue(
const float DELTA);
79 void checkCrashes(
const int STEPS,
const Vec3& pos);
82 virtual bool canSkid(
float steer_fraction) {
return false; }
87 virtual void update (
int ticks) ;
88 virtual void reset ();
90 bool dry_run =
false);
91 virtual void newLap (
int lap);
116 core::stringw
getName(
bool include_handicap_string =
true)
const
A base class for all AI karts.
Definition: ai_base_lap_controller.hpp:33
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
This is the base class for all cameras.
Definition: camera.hpp:49
This is the base class for kart controller - that can be a player or a a robot.
Definition: controller.hpp:46
virtual bool isLocalPlayerController() const =0
This function checks if this is a local player.
virtual core::stringw getName(bool include_handicap_string=true) const
Display name of the controller.
Definition: controller.cpp:39
virtual bool isPlayerController() const =0
This function checks if this player is not an AI, i.e.
virtual bool canGetAchievements() const
Only local players can get achievements.
Definition: controller.hpp:109
Definition: end_controller.hpp:43
virtual void newLap(int lap)
Callback when a new lap is triggered.
Definition: end_controller.cpp:154
virtual bool canSkid(float steer_fraction)
Return true if AI can skid now.
Definition: end_controller.hpp:82
core::stringw getName(bool include_handicap_string=true) const
Returns the name of the previous controller (which has the right player name associated).
Definition: end_controller.hpp:116
~EndController()
The destructor deletes the shared TrackInfo objects if no more EndController instances are around.
Definition: end_controller.cpp:116
int calcSteps()
calc_steps() divides the velocity vector by the lenght of the kart, and gets the number of steps to u...
Definition: end_controller.cpp:321
virtual void update(int ticks)
Updates the ai base controller each time step.
Definition: end_controller.cpp:176
Controller * m_previous_controller
Stores a pointer to the original controller.
Definition: end_controller.hpp:66
virtual bool isPlayerController() const
Returns if the original controller of the kart was a player controller.
Definition: end_controller.hpp:101
bool m_was_player_controller
Stores the type of the previous controller.
Definition: end_controller.hpp:48
void findNonCrashingPoint(Vec3 *result)
Find the sector that at the longest distance from the kart, that can be driven to without crashing wi...
Definition: end_controller.cpp:265
irr::scene::ISceneNode * m_debug_sphere
For debugging purpose: a sphere indicating where the AI is targeting at.
Definition: end_controller.hpp:70
virtual bool canGetAchievements() const
Only local players can get achievements.
Definition: end_controller.hpp:93
virtual bool action(PlayerAction action, int value, bool dry_run=false)
The end controller must forward 'fire' presses to the race gui.
Definition: end_controller.cpp:165
virtual bool isLocalPlayerController() const
Returns if the original controller of the kart was a local player controller.
Definition: end_controller.hpp:109
Definition: linear_world.hpp:36
Definition: track.hpp:114
A wrapper around bullets btVector3 to include conventient conversion functions (e....
Definition: vec3.hpp:35