Orxonox: orxonox::TeamDeathmatch Class Reference

# orxonox::TeamDeathmatch Class Reference

`#include <src/orxonox/objects/gametypes/TeamDeathmatch.h>`

Inheritance diagram for orxonox::TeamDeathmatch:

List of all members.

## Public Member Functions

virtual bool | allowPawnDamage (Pawn *victim, Pawn *originator=0)
virtual bool | allowPawnDeath (Pawn *victim, Pawn *originator=0)
virtual bool | allowPawnHit (Pawn *victim, Pawn *originator=0)
int | getTeam (PlayerInfo *player)
const ColourValue & | getTeamColour (int teamnr) const
virtual void | playerEntered (PlayerInfo *player)
virtual bool | playerLeft (PlayerInfo *player)
virtual void | playerStartsControllingPawn (PlayerInfo *player, Pawn *pawn)
void | setConfigValues ()
| Function to collect the SetConfigValue-macro calls.
| TeamDeathmatch (BaseObject *creator)
virtual | ~TeamDeathmatch ()

## Protected Member Functions

virtual SpawnPoint * | getBestSpawnPoint (PlayerInfo *player) const
bool | pawnsAreInTheSameTeam (Pawn *pawn1, Pawn *pawn2)

## Protected Attributes

std::vector< ColourValue > | teamcolours_
std::map< PlayerInfo *, int > | teamnumbers_
unsigned int | teams_

## Constructor & Destructor Documentation

orxonox::TeamDeathmatch::TeamDeathmatch | ( | BaseObject * | creator | ) |

References RegisterObject, setConfigValues(), and teams_.

virtual orxonox::TeamDeathmatch::~TeamDeathmatch | ( |  | ) | `[inline, virtual]`

## Member Function Documentation

bool orxonox::TeamDeathmatch::allowPawnDamage | ( | Pawn * | victim,
|  | Pawn * | originator = `0` |
| ) |  |  | `[virtual]`

Reimplemented from orxonox::Gametype.

Reimplemented in orxonox::TeamBaseMatch, and orxonox::UnderAttack.

References pawnsAreInTheSameTeam().

Referenced by orxonox::UnderAttack::allowPawnDamage(), and orxonox::TeamBaseMatch::allowPawnDamage().

bool orxonox::TeamDeathmatch::allowPawnDeath | ( | Pawn * | victim,
|  | Pawn * | originator = `0` |
| ) |  |  | `[virtual]`

Reimplemented from orxonox::Gametype.

Reimplemented in orxonox::TeamBaseMatch, and orxonox::UnderAttack.

References pawnsAreInTheSameTeam().

Referenced by orxonox::UnderAttack::allowPawnDeath(), and orxonox::TeamBaseMatch::allowPawnDeath().

bool orxonox::TeamDeathmatch::allowPawnHit | ( | Pawn * | victim,
|  | Pawn * | originator = `0` |
| ) |  |  | `[virtual]`

Reimplemented from orxonox::Gametype.

Reimplemented in orxonox::UnderAttack.

References pawnsAreInTheSameTeam().

Referenced by orxonox::UnderAttack::allowPawnHit().

SpawnPoint * orxonox::TeamDeathmatch::getBestSpawnPoint | ( | PlayerInfo * | player | ) | const`[protected, virtual]`

Reimplemented from orxonox::Gametype.

References Class, orxonox::TeamSpawnPoint::getTeamNumber(), orxonox::rnd(), and teamnumbers_.

int orxonox::TeamDeathmatch::getTeam | ( | PlayerInfo * | player | ) |

References teamnumbers_.

Referenced by orxonox::UnderAttack::allowPawnDamage(), orxonox::UnderAttack::allowPawnDeath(), orxonox::TeamBaseMatch::allowPawnDeath(), orxonox::UnderAttack::allowPawnHit(), orxonox::UnderAttackHealthBar::changedOwner(), orxonox::TeamBaseMatch::pawnsAreInTheSameTeam(), orxonox::TeamBaseMatch::playerScored(), and orxonox::ArtificialController::sameTeam().

const ColourValue& orxonox::TeamDeathmatch::getTeamColour | ( | int | teamnr | ) | const`[inline]`

Referenced by orxonox::TeamBaseMatchBase::changeTeamColour().

bool orxonox::TeamDeathmatch::pawnsAreInTheSameTeam | ( | Pawn * | pawn1,
|  | Pawn * | pawn2 |
| ) |  |  | `[protected]`

References orxonox::ControllableEntity::getPlayer(), and teamnumbers_.

Referenced by allowPawnDamage(), allowPawnDeath(), and allowPawnHit().

void orxonox::TeamDeathmatch::playerEntered | ( | PlayerInfo * | player | ) | `[virtual]`

Reimplemented from orxonox::Deathmatch.

References orxonox::Deathmatch::playerEntered(), teamnumbers_, and teams_.

bool orxonox::TeamDeathmatch::playerLeft | ( | PlayerInfo * | player | ) | `[virtual]`

Reimplemented from orxonox::Deathmatch.

References orxonox::Deathmatch::playerLeft(), and orxonox::Gametype::players_.

void orxonox::TeamDeathmatch::playerStartsControllingPawn | ( | PlayerInfo * | player,
|  | Pawn * | pawn |
| ) |  |  | `[virtual]`

Reimplemented from orxonox::Gametype.

References Class, orxonox::WorldEntity::getAttachedObjects(), orxonox::RadarViewable::setRadarObjectColour(), orxonox::TeamColourable::setTeamColour(), teamcolours_, and teamnumbers_.

void orxonox::TeamDeathmatch::setConfigValues | ( |  | ) |

Function to collect the SetConfigValue-macro calls.

Reimplemented from orxonox::Gametype.

Reimplemented in orxonox::UnderAttack.

References orxonox::MT_Type::ColourValue, SetConfigValue, SetConfigValueVector, teamcolours_, and teams_.

Referenced by TeamDeathmatch().

## Member Data Documentation

std::vector<ColourValue> orxonox::TeamDeathmatch::teamcolours_`[protected]`

Referenced by playerStartsControllingPawn(), and setConfigValues().

std::map<PlayerInfo*, int> orxonox::TeamDeathmatch::teamnumbers_`[protected]`

Referenced by orxonox::UnderAttack::destroyedPawn(), orxonox::TeamBaseMatch::endGame(), getBestSpawnPoint(), getTeam(), pawnsAreInTheSameTeam(), orxonox::TeamBaseMatch::pawnsAreInTheSameTeam(), playerEntered(), playerStartsControllingPawn(), and orxonox::UnderAttack::tick().

unsigned int orxonox::TeamDeathmatch::teams_`[protected]`

Reimplemented in orxonox::UnderAttack.

Referenced by playerEntered(), setConfigValues(), and TeamDeathmatch().

The documentation for this class was generated from the following files:

- src/orxonox/objects/gametypes/TeamDeathmatch.h
- src/orxonox/objects/gametypes/TeamDeathmatch.cc