|
| DemoWorld () |
| The constructor sets the number of (local) players to 0, since only AI karts are used.
|
|
virtual | ~DemoWorld () |
| Destructor.
|
|
virtual bool | isRaceOver () OVERRIDE |
| The race is over if either the requested number of laps have been done or the requested time is over.
|
|
virtual void | enterRaceOverState () OVERRIDE |
| This function is called when the race is finished, but end-of-race animations have still to be played.
|
|
virtual std::string | getInternalCode () const OVERRIDE |
| Returns identifier for this world.
|
|
virtual void | update (int ticks) OVERRIDE |
| Counts the number of frames.
|
|
void | abortDemo () |
| Signals that the demo should be aborted.
|
|
| ProfileWorld () |
| The constructor sets the number of (local) players to 0, since only AI karts are used.
|
|
virtual | ~ProfileWorld () |
| Sets profile mode off again.
|
|
virtual std::string | getInternalCode () const |
| Returns identifier for this world.
|
|
virtual void | update (int ticks) |
| Counts the number of frames.
|
|
virtual bool | isRaceOver () |
| The race is over if either the requested number of laps have been done or the requested time is over.
|
|
virtual void | enterRaceOverState () |
| This function is called when the race is finished, but end-of-race animations have still to be played.
|
|
Public Member Functions inherited from StandardRace |
virtual void | getDefaultCollectibles (int *collectible_type, int *amount) OVERRIDE |
| Called to determine the default collectibles to give each player at the start for this kind of race.
|
|
virtual bool | haveBonusBoxes () OVERRIDE |
| Returns if this mode supports bonus boxes or not.
|
|
virtual const std::string & | getIdent () const OVERRIDE |
| Returns an identifier for this race.
|
|
virtual void | endRaceEarly () OVERRIDE |
| Ends the race early and places still active player karts at the back.
|
|
| LinearWorld () |
| Constructs the linear world.
|
|
virtual void | init () OVERRIDE |
| call just after instanciating.
|
|
virtual | ~LinearWorld () |
| The destructor frees al data structures.
|
|
virtual void | update (int ticks) OVERRIDE |
| General update function called once per frame.
|
|
virtual void | updateGraphics (float dt) OVERRIDE |
| This updates all only graphical elements.It is only called once per rendered frame, not once per time step.
|
|
float | getDistanceDownTrackForKart (const int kart_id, bool account_for_checklines) const |
| Returns the distance the kart has travelled along the track since crossing the start line.
|
|
void | updateTrackSectors () |
|
void | updateRacePosition () |
| Find the position (rank) of every kart.
|
|
float | getDistanceToCenterForKart (const int kart_id) const |
| Gets the distance of the kart from the center of the driveline.
|
|
float | getEstimatedFinishTime (const int kart_id) const |
| Returns the estimated finishing time.
|
|
int | getLapForKart (const int kart_id) const |
|
int | getTicksAtLapForKart (const int kart_id) const |
|
float | getLiveTimeDifference () const |
|
bool | hasValidTimeDifference () const |
|
virtual void | getKartsDisplayInfo (std::vector< RaceGUIBase::KartIconDisplayInfo > *info) OVERRIDE |
| Called by the code that draws the list of karts on the race GUI to know what needs to be drawn in the current mode.
|
|
virtual unsigned int | getNumberOfRescuePositions () const OVERRIDE |
| Returns the number of rescue positions on a given track, which in linear races is just the number of driveline quads.
|
|
virtual unsigned int | getRescuePositionIndex (AbstractKart *kart) OVERRIDE |
| Determines the rescue position for a kart.
|
|
virtual btTransform | getRescueTransform (unsigned int index) const OVERRIDE |
| Returns the bullet transformation for the specified rescue index.
|
|
virtual void | reset (bool restart=false) OVERRIDE |
| Called before a race is started (or restarted).
|
|
virtual void | newLap (unsigned int kart_index) OVERRIDE |
| Is called by check structures if a kart starts a new lap.
|
|
virtual bool | raceHasLaps () OVERRIDE |
| Returns if this race mode has laps.
|
|
virtual bool | haveBonusBoxes () OVERRIDE |
| Returns if this race mode has bonus items.
|
|
virtual bool | useChecklineRequirements () const OVERRIDE |
| Override settings from base class.
|
|
int | getFinishedLapsOfKart (unsigned int kart_index) const OVERRIDE |
| Returns the number of laps a kart has completed.
|
|
void | setLastTriggeredCheckline (unsigned int kart_index, int index) |
|
float | getOverallDistance (unsigned int kart_index) const |
| Returns how far the kart has driven so far (i.e.
|
|
float | getFastestLap () const |
| Returns time for the fastest laps.
|
|
stringw | getFastestLapKartName () const |
| Returns the kart name that made the fastest lap time.
|
|
int | getFastestLapTicks () const |
| Network use: get fastest lap in ticks.
|
|
void | setFastestLapTicks (int ticks) |
| Network use: set fastest lap in ticks.
|
|
void | setFastestKartName (const stringw &name) |
| Network use: set fastest kart name.
|
|
virtual std::pair< uint32_t, uint32_t > | getGameStartedProgress () const OVERRIDE |
| Used by server to get the current started game progress in either or both remaining time or progress in percent.
|
|
virtual void | saveCompleteState (BareNetworkString *bns, STKPeer *peer) OVERRIDE |
|
virtual void | restoreCompleteState (const BareNetworkString &b) OVERRIDE |
|
void | updateCheckLinesServer (int check_id, int kart_id) |
| Called in server whenever a kart cross a check line, it send server current kart lap count, last triggered checkline and check structure status to all players in game (including spectators so that the lap count is correct)
|
|
void | updateCheckLinesClient (const BareNetworkString &b) |
|
void | handleServerCheckStructureCount (unsigned count) |
|
virtual bool | showLapsTarget () OVERRIDE |
| If true lap counter shows lap count in format: 4/20 or if false then in format: 4.
|
|
virtual void | init () OVERRIDE |
| call just after instanciating.
|
|
virtual void | reset (bool restart=false) OVERRIDE |
| This function is called before a race is started (i.e.
|
|
bool | displayRank () const |
|
void | beginSetKartPositions () |
| This function must be called before starting to set all kart positions again.
|
|
bool | setKartPosition (unsigned int kart_id, unsigned int position) |
| Sets the position of a kart.
|
|
void | endSetKartPositions () |
| Called once the last position was set.
|
|
AbstractKart * | getKartAtPosition (unsigned int p) const |
| Returns the kart with a given position.
|
|
virtual AbstractKart * | getKartAtDrawingPosition (unsigned int p) const |
| Returns the kart at which position (start from 1) to draw race icon.
|
|
virtual int | getScoreForPosition (int p) |
| Returns the number of points for a kart at a specified position.
|
|
virtual unsigned int | getRescuePositionIndex (AbstractKart *kart) OVERRIDE |
| Determines the rescue position for a kart.
|
|
TrackSector * | getTrackSector (unsigned int kart_index) const |
| Returns the track_sector object for the specified kart.
|
|
bool | isOnRoad (unsigned int kart_index) const |
| Returns true if the kart is on a valid graph quad.
|
|
int | getSectorForKart (const AbstractKart *kart) const |
| Gets the sector a kart is on.
|
|
| World () |
| The main world class is used to handle the track and the karts.
|
|
virtual const std::string & | getIdent () const =0 |
| Each game mode should have a unique identifier.
|
|
virtual unsigned int | getNumberOfRescuePositions () const |
| Returns the number of rescue positions on a given track and game mode.
|
|
virtual unsigned int | getRescuePositionIndex (AbstractKart *kart)=0 |
| Determines the rescue position index of the specified kart.
|
|
virtual btTransform | getRescueTransform (unsigned int index) const |
| Returns the bullet transformation for the specified rescue index.
|
|
virtual void | moveKartAfterRescue (AbstractKart *kart) |
| Places a kart that is rescued.
|
|
virtual bool | raceHasLaps ()=0 |
| Called when it is needed to know whether this kind of race involves counting laps.
|
|
virtual bool | showLapsTarget () |
| If true lap counter shows lap count in format: 4/20 or if false then in format: 4.
|
|
virtual int | getFinishedLapsOfKart (unsigned int kart_index) const |
| Returns the number of laps for a given kart.
|
|
virtual void | getKartsDisplayInfo (std::vector< RaceGUIBase::KartIconDisplayInfo > *info)=0 |
| Called by the code that draws the list of karts on the race GUI to know what needs to be drawn in the current mode.
|
|
virtual void | init () |
| This function is called after instanciating.
|
|
virtual void | updateGraphics (float dt) |
| This updates all only graphical elements.
|
|
virtual void | terminateRace () OVERRIDE |
| Called at the end of a race.
|
|
virtual void | reset (bool restart=false) OVERRIDE |
| This function is called before a race is started (i.e.
|
|
virtual void | pause (Phase phase) OVERRIDE |
| Pauses the music (and then pauses WorldStatus).
|
|
virtual void | unpause () OVERRIDE |
| Switches back from a pause state to the previous state.
|
|
virtual void | getDefaultCollectibles (int *collectible_type, int *amount) |
| Called to determine the default collectibles to give each player at the start for this kind of race.
|
|
virtual void | collectedItem (const AbstractKart *kart, const ItemState *item) |
| Receives notification if an item is collected.
|
|
virtual void | endRaceEarly () |
|
virtual bool | hasRaceEndedEarly () const |
|
virtual bool | haveBonusBoxes () |
| Called to determine whether this race mode uses bonus boxes.
|
|
virtual bool | useFastMusicNearEnd () const |
| Returns if this mode should use fast music (if available).
|
|
virtual void | kartAdded (AbstractKart *kart, scene::ISceneNode *node) |
| If you want to do something to karts or their graphics at the start of the race, override this.
|
|
virtual void | newLap (unsigned int kart_index) |
| Called whenever a kart starts a new lap.
|
|
virtual bool | kartHit (int kart_id, int hitter=-1) |
| Called when a kart was hit by a projectile.
|
|
virtual void | onMouseClick (int x, int y) |
|
Highscores * | getHighscores () const |
|
Highscores * | getGPHighscores () const |
|
void | schedulePause (Phase phase) |
|
void | scheduleUnpause () |
|
void | scheduleExitRace () |
|
void | scheduleTutorial () |
|
void | updateWorld (int ticks) |
| This is the main interface to update the world.
|
|
void | handleExplosion (const Vec3 &xyz, AbstractKart *kart_hit, PhysicalObject *object) |
|
AbstractKart * | getPlayerKart (unsigned int player) const |
| Returns the n-th player kart.
|
|
AbstractKart * | getLocalPlayerKart (unsigned int n) const |
| Returns the nth local player kart, i.e.
|
|
virtual const btTransform & | getStartTransform (int index) |
| Returns the start coordinates for a kart with a given index.
|
|
void | moveKartTo (AbstractKart *kart, const btTransform &t) |
| Places the kart at a given position and rotation.
|
|
void | updateTimeTargetSound () |
|
RaceGUIBase * | getRaceGUI () const |
| Returns a pointer to the race gui.
|
|
unsigned int | getNumKarts () const |
| Returns the number of karts in the race.
|
|
AbstractKart * | getKart (int kartId) const |
| Returns the kart with a given world id.
|
|
const KartList & | getKarts () const |
| Returns all karts.
|
|
unsigned int | getCurrentNumKarts () const |
| Returns the number of currently active (i.e.non-elikminated) karts.
|
|
unsigned int | getCurrentNumPlayers () const |
| Returns the number of currently active (i.e.
|
|
void | resetElimination () |
|
virtual void | addReservedKart (int kart_id) |
|
virtual void | saveCompleteState (BareNetworkString *bns, STKPeer *peer) |
|
virtual void | restoreCompleteState (const BareNetworkString &buffer) |
|
virtual bool | shouldDrawTimer () const |
| The code that draws the timer should call this first to know whether the game mode wants a timer drawn.
|
|
bool | useHighScores () const |
|
virtual void | onFirePressed (Controller *who) |
| Override if you want to know when a kart presses fire.
|
|
virtual bool | useChecklineRequirements () const |
| Whether to compute checkline requirements for each world on the quadgraph.
|
|
virtual void | escapePressed () |
|
virtual void | loadCustomModels () |
|
void | eliminateKart (int kart_number, bool notify_of_elimination=true) |
| Remove (eliminate) a kart from the race.
|
|
void | setUnfairTeam (bool val) |
|
virtual bool | hasTeam () const |
|
KartTeam | getKartTeam (unsigned int kart_id) const |
| Get the team of kart in world (including AIs)
|
|
int | getTeamNum (KartTeam team) const |
|
void | setNetworkWorld (bool is_networked) |
| Set the network mode (true if networked)
|
|
bool | isNetworkWorld () const |
|
void | initTeamArrows (AbstractKart *k) |
| Set the team arrow on karts if necessary.
|
|
virtual std::pair< uint32_t, uint32_t > | getGameStartedProgress () const |
| Used by server to get the current started game progress in either or both remaining time or progress in percent.
|
|
virtual bool | isGoalPhase () const |
|
virtual | ~WorldStatus () |
| Destructor of WorldStatus.
|
|
virtual void | reset (bool restart) |
| Resets all status information, used when starting a new race.
|
|
virtual void | updateTime (int ticks) |
| Updates the world time and clock (which might be running backwards), and all status information, called once per frame at the end of the main loop.
|
|
virtual void | update (int ticks) |
| Update, called once per frame.
|
|
void | startReadySetGo () |
|
virtual void | pause (Phase phase) |
| Pauses the game and switches to the specified phase.
|
|
virtual void | unpause () |
| Switches back from a pause state to the previous state.
|
|
virtual void | enterRaceOverState () |
| Called when the race is finished, but it still leaves some time for an end of race animation, and potentially let some more AI karts finish the race.
|
|
virtual void | terminateRace () |
| Called when it's really over (delay over if any).
|
|
void | setTime (const float time) |
| Sets the time for the clock.
|
|
void | setTicks (int ticks) |
| Sets a new time for the world time, measured in ticks.
|
|
void | setTicksForRewind (int ticks) |
| Sets a new time for the world time (used by rewind), measured in ticks.
|
|
bool | isStartPhase () const |
|
bool | isRacePhase () const |
|
bool | isActiveRacePhase () const |
|
bool | isFinishPhase () const |
| While the race menu is being displayed, m_phase is limbo, and m_previous_phase is finish.
|
|
const Phase | getPhase () const |
| Returns the current race phase.
|
|
void | setPhase (Phase phase) |
| Sets the current race phase.
|
|
void | setClockMode (const ClockType mode, const float initial_time=0.0f) |
| Call to specify what kind of clock you want.
|
|
int | getClockMode () const |
| Returns the current clock mode.
|
|
float | getTime () const |
| Returns the current race time.
|
|
uint64_t | getStart () const |
| Returns the start time.
|
|
int | getTimeTicks () const |
| Returns the current race time in time ticks (i.e.
|
|
virtual void | countdownReachedZero () |
| Will be called to notify your derived class that the clock, which is in COUNTDOWN mode, has reached zero.
|
|
virtual void | onGo () |
| Called when the race actually starts.
|
|
int | getTicksSinceStart () const |
| Get the ticks since start regardless of which way the clock counts.
|
|
int | getAuxiliaryTicks () const |
|
bool | isLiveJoinWorld () const |
|
void | setLiveJoinWorld (bool val) |
|
int | getMusicDescriptionTicks () const |
|
void | endLiveJoinWorld (int ticks_now) |
| Base on the network timer set current world count up ticks to tick_now.
|
|