zSelectorTeammate Class Reference

#include <zSelector.h>

Inheritance diagram for zSelectorTeammate:

Inheritance graph
[legend]
Collaboration diagram for zSelectorTeammate:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

static zSelectorcreate ()


Detailed Description

Definition at line 98 of file zSelector.h.


Constructor & Destructor Documentation

zSelectorTeammate::zSelectorTeammate (  ) 

Definition at line 150 of file zSelector.cpp.

Referenced by copy(), and create().

00150                                     :
00151         zSelector()
00152 { }

Here is the caller graph for this function:

zSelectorTeammate::zSelectorTeammate ( zSelectorTeammate const &  other  ) 

Definition at line 154 of file zSelector.cpp.

00154                                                                   :
00155         zSelector(other)
00156 { }

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

Definition at line 106 of file zSelector.h.

00106 {};


Member Function Documentation

zSelector * zSelectorTeammate::create (  )  [static]

Reimplemented from zSelector.

Definition at line 145 of file zSelector.cpp.

References zSelectorTeammate().

00146 {
00147     return new zSelectorTeammate();
00148 }

Here is the call graph for this function:

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

overloaded assignment operator

Definition at line 158 of file zSelector.cpp.

References zSelector::operator=().

00159 {
00160     this->zSelector::operator=(other);
00161 }

Here is the call graph for this function:

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

Reimplemented from zSelector.

Definition at line 163 of file zSelector.cpp.

References zSelectorTeammate().

00164 {
00165     return new zSelectorTeammate(*this);
00166 }

Here is the call graph for this function:

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

Reimplemented from zSelector.

Definition at line 168 of file zSelector.cpp.

References _alive, ePlayerNetID::CurrentTeam(), eTeam::GetAllMembers(), zSelector::getAllValid(), zSelector::pickOne(), eNetGameObject::Player(), and gVectorExtra< T >::remove().

00169 {
00170     // A single, randomly selected player that is member of the team of
00171     // the player that triggered the Zone receives the effect. This
00172     // includes the player that triggered the Zone as a candidate.
00173     gVectorExtra <ePlayerNetID *> teammates;
00174     gVectorExtra <ePlayerNetID *> singleTeammate;
00175 
00176     ePlayerNetID* triggererPlayer =  triggerer->Player();
00177     if (triggererPlayer != 0) {
00178         getAllValid(teammates, triggererPlayer->CurrentTeam()->GetAllMembers(), _alive);
00179 
00180         // Remove the triggerer if it is there
00181         teammates.remove(triggererPlayer);
00182 
00183         // Who is our lucky candidate ?
00184         if(teammates.size() != 0)
00185             singleTeammate.push_back(pickOne(teammates));
00186     }
00187     return singleTeammate;
00188 }

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