#include <zSelector.h>
Public Member Functions | |
zSelectorAnyDead () | |
zSelectorAnyDead (zSelectorAnyDead const &other) | |
void | operator= (zSelectorAnyDead const &other) |
overloaded assignment operator | |
virtual zSelectorAnyDead * | copy (void) const |
virtual | ~zSelectorAnyDead () |
gVectorExtra< ePlayerNetID * > | select (gVectorExtra< nNetObjectID > &owners, gVectorExtra< nNetObjectID > &teamOwners, gCycle *triggerer) |
Static Public Member Functions | |
static zSelector * | create () |
Definition at line 256 of file zSelector.h.
zSelectorAnyDead::zSelectorAnyDead | ( | ) |
Definition at line 591 of file zSelector.cpp.
Referenced by copy(), and create().
00591 : 00592 zSelector() 00593 { }
zSelectorAnyDead::zSelectorAnyDead | ( | zSelectorAnyDead const & | other | ) |
virtual zSelectorAnyDead::~zSelectorAnyDead | ( | ) | [inline, virtual] |
zSelector * zSelectorAnyDead::create | ( | ) | [static] |
Reimplemented from zSelector.
Definition at line 586 of file zSelector.cpp.
References zSelectorAnyDead().
00587 { 00588 return new zSelectorAnyDead(); 00589 }
void zSelectorAnyDead::operator= | ( | zSelectorAnyDead const & | other | ) |
overloaded assignment operator
Definition at line 599 of file zSelector.cpp.
References zSelector::operator=().
00600 { 00601 this->zSelector::operator=(other); 00602 }
zSelectorAnyDead * zSelectorAnyDead::copy | ( | void | ) | const [virtual] |
Reimplemented from zSelector.
Definition at line 604 of file zSelector.cpp.
References zSelectorAnyDead().
00605 { 00606 return new zSelectorAnyDead(*this); 00607 }
gVectorExtra< ePlayerNetID * > zSelectorAnyDead::select | ( | gVectorExtra< nNetObjectID > & | owners, | |
gVectorExtra< nNetObjectID > & | teamOwners, | |||
gCycle * | triggerer | |||
) | [virtual] |
Reimplemented from zSelector.
Definition at line 609 of file zSelector.cpp.
References _dead, zSelector::getAllValid(), GrowingArrayBase::Len(), zSelector::pickOne(), and se_PlayerNetIDs.
00610 { 00611 // A single, randomly selected dead player receives the 00612 // effect. 00613 00614 gVectorExtra<ePlayerNetID *> everybody; 00615 for (int i=0; i<se_PlayerNetIDs.Len(); i++) { 00616 everybody.push_back( se_PlayerNetIDs(i) ); 00617 } 00618 00619 gVectorExtra<ePlayerNetID *> everybodyDead; 00620 getAllValid(everybodyDead, everybody, _dead); 00621 00622 gVectorExtra<ePlayerNetID *> singleDead; 00623 if(everybodyDead.size() != 0) 00624 singleDead.push_back(pickOne(everybodyDead)); 00625 00626 return singleDead; 00627 }