zSelectorAnotherNotTeammateDead Class Reference

#include <zSelector.h>

Inheritance diagram for zSelectorAnotherNotTeammateDead:

Inheritance graph
[legend]
Collaboration diagram for zSelectorAnotherNotTeammateDead:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

static zSelectorcreate ()


Detailed Description

Definition at line 325 of file zSelector.h.


Constructor & Destructor Documentation

zSelectorAnotherNotTeammateDead::zSelectorAnotherNotTeammateDead (  ) 

Definition at line 789 of file zSelector.cpp.

Referenced by copy(), and create().

00789                                                                 :
00790         zSelector()
00791 { }

Here is the caller graph for this function:

zSelectorAnotherNotTeammateDead::zSelectorAnotherNotTeammateDead ( zSelectorAnotherNotTeammateDead const &  other  ) 

Definition at line 793 of file zSelector.cpp.

00793                                                                                                             :
00794         zSelector(other)
00795 { }

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

Definition at line 333 of file zSelector.h.

00333 {};


Member Function Documentation

zSelector * zSelectorAnotherNotTeammateDead::create (  )  [static]

Reimplemented from zSelector.

Definition at line 784 of file zSelector.cpp.

References zSelectorAnotherNotTeammateDead().

00785 {
00786     return new zSelectorAnotherNotTeammateDead();
00787 }

Here is the call graph for this function:

void zSelectorAnotherNotTeammateDead::operator= ( zSelectorAnotherNotTeammateDead const &  other  ) 

overloaded assignment operator

Definition at line 797 of file zSelector.cpp.

References zSelector::operator=().

00798 {
00799     this->zSelector::operator=(other);
00800 }

Here is the call graph for this function:

zSelectorAnotherNotTeammateDead * zSelectorAnotherNotTeammateDead::copy ( void   )  const [virtual]

Reimplemented from zSelector.

Definition at line 802 of file zSelector.cpp.

References zSelectorAnotherNotTeammateDead().

00803 {
00804     return new zSelectorAnotherNotTeammateDead(*this);
00805 }

Here is the call graph for this function:

gVectorExtra< ePlayerNetID * > zSelectorAnotherNotTeammateDead::select ( gVectorExtra< nNetObjectID > &  owners,
gVectorExtra< nNetObjectID > &  teamOwners,
gCycle triggerer 
) [virtual]

Reimplemented from zSelector.

Definition at line 807 of file zSelector.cpp.

References _dead, _either, ePlayerNetID::CurrentTeam(), eTeam::GetAllMembers(), zSelector::getAllValid(), GrowingArrayBase::Len(), zSelector::pickOne(), eNetGameObject::Player(), gVectorExtra< T >::removeAll(), and se_PlayerNetIDs.

00808 {
00809     // A single, randomly selected dead player receives the
00810     // effect.
00811 
00812     // Get all the dead players
00813     gVectorExtra<ePlayerNetID *> everybody;
00814     for (int i=0; i<se_PlayerNetIDs.Len(); i++) {
00815         everybody.push_back( se_PlayerNetIDs(i) );
00816     }
00817     gVectorExtra<ePlayerNetID *> everybodyDead;
00818     getAllValid(everybodyDead, everybody, _dead);
00819 
00820     gVectorExtra <ePlayerNetID *> singleDeadNotTeammate;
00821     if (everybodyDead.size() != 0)
00822     {
00823         gVectorExtra <ePlayerNetID *> teammates;
00824         // Remove all the teammates
00825         ePlayerNetID* triggererPlayer =  triggerer->Player();
00826         if (triggererPlayer != 0)
00827         {
00828             getAllValid(teammates, triggererPlayer->CurrentTeam()->GetAllMembers(), _either);
00829 
00830             // Remove the teammates
00831             everybodyDead.removeAll(teammates);
00832 
00833             // Who is our lucky candidate ?
00834             if(everybodyDead.size() != 0)
00835                 singleDeadNotTeammate.push_back(pickOne(everybodyDead));
00836         }
00837     }
00838     return singleDeadNotTeammate;
00839 }

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:55 2008 for Armagetron Advanced by  doxygen 1.5.4