zSelectorAnyDead Class Reference

#include <zSelector.h>

Inheritance diagram for zSelectorAnyDead:

Inheritance graph
[legend]
Collaboration diagram for zSelectorAnyDead:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 zSelectorAnyDead ()
 zSelectorAnyDead (zSelectorAnyDead const &other)
void operator= (zSelectorAnyDead const &other)
 overloaded assignment operator
virtual zSelectorAnyDeadcopy (void) const
virtual ~zSelectorAnyDead ()
gVectorExtra< ePlayerNetID * > select (gVectorExtra< nNetObjectID > &owners, gVectorExtra< nNetObjectID > &teamOwners, gCycle *triggerer)

Static Public Member Functions

static zSelectorcreate ()


Detailed Description

Definition at line 256 of file zSelector.h.


Constructor & Destructor Documentation

zSelectorAnyDead::zSelectorAnyDead (  ) 

Definition at line 591 of file zSelector.cpp.

Referenced by copy(), and create().

00591                                   :
00592         zSelector()
00593 { }

Here is the caller graph for this function:

zSelectorAnyDead::zSelectorAnyDead ( zSelectorAnyDead const &  other  ) 

Definition at line 595 of file zSelector.cpp.

00595                                                                :
00596         zSelector(other)
00597 { }

virtual zSelectorAnyDead::~zSelectorAnyDead (  )  [inline, virtual]

Definition at line 264 of file zSelector.h.

00264 {};


Member Function Documentation

zSelector * zSelectorAnyDead::create (  )  [static]

Reimplemented from zSelector.

Definition at line 586 of file zSelector.cpp.

References zSelectorAnyDead().

00587 {
00588     return new zSelectorAnyDead();
00589 }

Here is the call graph for this function:

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 }

Here is the call graph for this function:

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 }

Here is the call graph for this function:

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 }

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Sun Mar 16 00:01:57 2008 for Armagetron Advanced by  doxygen 1.5.4