#include <src/orxonox/objects/gametypes/TeamDeathmatch.h>
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_ |
orxonox::TeamDeathmatch::TeamDeathmatch | ( | BaseObject * | creator | ) |
References RegisterObject, setConfigValues(), and teams_.
virtual orxonox::TeamDeathmatch::~TeamDeathmatch | ( | ) | [inline, virtual] |
Reimplemented from orxonox::Gametype.
Reimplemented in orxonox::TeamBaseMatch, and orxonox::UnderAttack.
References pawnsAreInTheSameTeam().
Referenced by orxonox::UnderAttack::allowPawnDamage(), and orxonox::TeamBaseMatch::allowPawnDamage().
Reimplemented from orxonox::Gametype.
Reimplemented in orxonox::TeamBaseMatch, and orxonox::UnderAttack.
References pawnsAreInTheSameTeam().
Referenced by orxonox::UnderAttack::allowPawnDeath(), and orxonox::TeamBaseMatch::allowPawnDeath().
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().
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().
std::vector<ColourValue> orxonox::TeamDeathmatch::teamcolours_ [protected] |
Referenced by playerStartsControllingPawn(), and setConfigValues().
std::map<PlayerInfo*, int> orxonox::TeamDeathmatch::teamnumbers_ [protected] |
unsigned int orxonox::TeamDeathmatch::teams_ [protected] |
Reimplemented in orxonox::UnderAttack.
Referenced by playerEntered(), setConfigValues(), and TeamDeathmatch().