19#ifndef HEADER_GHOST_CONTROLLER_HPP
20#define HEADER_GHOST_CONTROLLER_HPP
22#include "karts/controller/controller.hpp"
23#include "states_screens/state_manager.hpp"
49 virtual void reset() OVERRIDE;
50 virtual
void update (
int ticks) OVERRIDE;
51 virtual
bool disableSlipstreamBonus() const OVERRIDE {
return true; }
52 virtual void crashed(
const Material *m) OVERRIDE {}
54 virtual void handleZipper(
bool play_sound) OVERRIDE {}
56 virtual void collectedItem(
const ItemState &item,
57 float previous_energy=0) OVERRIDE {}
58 virtual void setPosition(
int p) OVERRIDE {}
62 bool dry_run=
false) OVERRIDE;
63 virtual
void skidBonusTriggered() OVERRIDE {}
64 virtual void newLap(
int lap) OVERRIDE {}
69 void addReplayTime(
float time);
71 bool isReplayEnd()
const
74 float getReplayDelta()
const
81 unsigned int getCurrentReplayIndex()
const
85 float getTimeAtIndex(
unsigned int index)
const
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
virtual core::stringw getName(bool include_handicap_string=true) const
Display name of the controller.
Definition: controller.cpp:39
A class for Ghost controller.
Definition: ghost_controller.hpp:31
virtual void newLap(int lap) OVERRIDE
Callback whenever a new lap is triggered.
Definition: ghost_controller.hpp:64
virtual bool isPlayerController() const OVERRIDE
This function checks if this player is not an AI, i.e.
Definition: ghost_controller.hpp:59
virtual bool isLocalPlayerController() const OVERRIDE
This function checks if this is a local player.
Definition: ghost_controller.hpp:60
virtual void finishedRace(float time) OVERRIDE
Called whan this controller's kart finishes the last lap.
Definition: ghost_controller.hpp:55
std::vector< float > m_all_times
The list of the times at which the events of kart were reached.
Definition: ghost_controller.hpp:44
core::stringw getName(bool include_handicap_string=true) const OVERRIDE
Return the display name; if not set, use default display name (kart name)
Definition: ghost_controller.hpp:93
float m_current_time
The current world time.
Definition: ghost_controller.hpp:38
virtual bool action(PlayerAction action, int value, bool dry_run=false) OVERRIDE
Default: ignore actions.
Definition: ghost_controller.cpp:85
core::stringw m_display_name
Player name of the ghost kart.
Definition: ghost_controller.hpp:41
unsigned int m_current_index
Pointer to the last index in m_all_times that is smaller than the current world time.
Definition: ghost_controller.hpp:35
Contains the state information of an item, i.e.
Definition: item.hpp:53
Definition: material.hpp:48