19#ifndef HEADER_PLAYER_CONTROLLER_HPP
20#define HEADER_PLAYER_CONTROLLER_HPP
22#include "karts/controller/controller.hpp"
31 int m_steer_val, m_steer_val_l, m_steer_val_r;
32 uint16_t m_prev_accel;
38 virtual void steer(
int ticks,
int steer_val);
43 virtual void update (
int ticks) OVERRIDE;
45 bool dry_run =
false ) OVERRIDE;
47 int value_l,
int value_r);
49 virtual void reset () OVERRIDE;
55 virtual void collectedItem(
const ItemState &item,
56 float previous_energy=0 ) OVERRIDE { };
71 virtual void crashed(
const Material *m) OVERRIDE
77 virtual void newLap(
int lap) OVERRIDE
93 core::stringw
getName(
bool include_handicap_string =
true) const OVERRIDE;
An abstract interface for the actual karts.
Definition: abstract_kart.hpp:62
Describes a chain of 8-bit unsigned integers.
Definition: network_string.hpp:53
This is the base class for kart controller - that can be a player or a a robot.
Definition: controller.hpp:46
Contains the state information of an item, i.e.
Definition: item.hpp:53
Definition: kart_rewinder.hpp:30
Definition: material.hpp:48
Definition: player_controller.hpp:28
core::stringw getName(bool include_handicap_string=true) const OVERRIDE
Returns the name of the player profile.
Definition: player_controller.cpp:400
virtual bool disableSlipstreamBonus() const OVERRIDE
Player will always be able to get a slipstream bonus.
Definition: player_controller.hpp:82
virtual bool isPlayerController() const OVERRIDE
This function checks if this player is not an AI, i.e.
Definition: player_controller.hpp:58
virtual void finishedRace(float time) OVERRIDE
Called when a race is finished.
Definition: player_controller.hpp:88
virtual ~PlayerController()
Destructor for a player kart.
Definition: player_controller.cpp:55
virtual void skidBonusTriggered() OVERRIDE
Callback when the skidding bonus is triggered.
Definition: player_controller.cpp:319
virtual void reset() OVERRIDE
Resets the player kart for a new or restarted race.
Definition: player_controller.cpp:62
virtual bool action(PlayerAction action, int value, bool dry_run=false) OVERRIDE
This function interprets a kart action and value, and set the corresponding entries in the kart contr...
Definition: player_controller.cpp:112
virtual void resetInputState()
Resets the state of control keys.
Definition: player_controller.cpp:78
virtual void newLap(int lap) OVERRIDE
Callback whenever a new lap is triggered.
Definition: player_controller.hpp:77
virtual void displayPenaltyWarning()
Called when this kart started too early and got a start penalty.
Definition: player_controller.cpp:421
virtual void setPosition(int p) OVERRIDE
Called just before the position of the kart is changed.
Definition: player_controller.hpp:63
virtual void update(int ticks) OVERRIDE
Updates the player kart, called once each timestep.
Definition: player_controller.cpp:327
virtual void handleZipper(bool play_sound) OVERRIDE
Called when a kart hits or uses a zipper.
Definition: player_controller.cpp:371
virtual void steer(int ticks, int steer_val)
Handles steering for a player kart.
Definition: player_controller.cpp:268
virtual bool isLocalPlayerController() const OVERRIDE
This function checks if this is a local player.
Definition: player_controller.hpp:60