#include <zSelector.h>
Public Member Functions | |
zSelectorAnotherTeammateDead () | |
zSelectorAnotherTeammateDead (zSelectorAnotherTeammateDead const &other) | |
void | operator= (zSelectorAnotherTeammateDead const &other) |
overloaded assignment operator | |
virtual zSelectorAnotherTeammateDead * | copy (void) const |
virtual | ~zSelectorAnotherTeammateDead () |
gVectorExtra< ePlayerNetID * > | select (gVectorExtra< nNetObjectID > &owners, gVectorExtra< nNetObjectID > &teamOwners, gCycle *triggerer) |
Static Public Member Functions | |
static zSelector * | create () |
Definition at line 308 of file zSelector.h.
zSelectorAnotherTeammateDead::zSelectorAnotherTeammateDead | ( | ) |
Definition at line 739 of file zSelector.cpp.
Referenced by copy(), and create().
00739 : 00740 zSelector() 00741 { }
zSelectorAnotherTeammateDead::zSelectorAnotherTeammateDead | ( | zSelectorAnotherTeammateDead const & | other | ) |
virtual zSelectorAnotherTeammateDead::~zSelectorAnotherTeammateDead | ( | ) | [inline, virtual] |
zSelector * zSelectorAnotherTeammateDead::create | ( | ) | [static] |
Reimplemented from zSelector.
Definition at line 734 of file zSelector.cpp.
References zSelectorAnotherTeammateDead().
00735 { 00736 return new zSelectorAnotherTeammateDead(); 00737 }
void zSelectorAnotherTeammateDead::operator= | ( | zSelectorAnotherTeammateDead const & | other | ) |
overloaded assignment operator
Definition at line 747 of file zSelector.cpp.
References zSelector::operator=().
00748 { 00749 this->zSelector::operator=(other); 00750 }
zSelectorAnotherTeammateDead * zSelectorAnotherTeammateDead::copy | ( | void | ) | const [virtual] |
Reimplemented from zSelector.
Definition at line 752 of file zSelector.cpp.
References zSelectorAnotherTeammateDead().
00753 { 00754 return new zSelectorAnotherTeammateDead(*this); 00755 }
gVectorExtra< ePlayerNetID * > zSelectorAnotherTeammateDead::select | ( | gVectorExtra< nNetObjectID > & | owners, | |
gVectorExtra< nNetObjectID > & | teamOwners, | |||
gCycle * | triggerer | |||
) | [virtual] |
Reimplemented from zSelector.
Definition at line 757 of file zSelector.cpp.
References _dead, ePlayerNetID::CurrentTeam(), eTeam::GetAllMembers(), zSelector::getAllValid(), zSelector::pickOne(), eNetGameObject::Player(), and gVectorExtra< T >::remove().
00758 { 00759 // A single, randomly selected dead member of 00760 // the team of the player that triggered the Zone receives the 00761 // effect. 00762 00763 gVectorExtra <ePlayerNetID *> deadTeammates; 00764 gVectorExtra <ePlayerNetID *> singleDeadTeammate; 00765 00766 ePlayerNetID* triggererPlayer = triggerer->Player(); 00767 if (triggererPlayer != 0) { 00768 getAllValid(deadTeammates, triggererPlayer->CurrentTeam()->GetAllMembers(), _dead); 00769 00770 // Remove the triggerer if it is there 00771 deadTeammates.remove(triggererPlayer); 00772 00773 // Who is our lucky candidate ? 00774 if(deadTeammates.size() != 0) 00775 singleDeadTeammate.push_back(pickOne(deadTeammates)); 00776 } 00777 return singleDeadTeammate; 00778 }