zSelectorAnother Class Reference

#include <zSelector.h>

Inheritance diagram for zSelectorAnother:

Inheritance graph
[legend]
Collaboration diagram for zSelectorAnother:

Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Static Public Member Functions

static zSelectorcreate ()


Detailed Description

Definition at line 180 of file zSelector.h.


Constructor & Destructor Documentation

zSelectorAnother::zSelectorAnother (  ) 

Definition at line 379 of file zSelector.cpp.

Referenced by copy(), and create().

00379                                   :
00380         zSelector()
00381 { }

Here is the caller graph for this function:

zSelectorAnother::zSelectorAnother ( zSelectorAnother const &  other  ) 

Definition at line 383 of file zSelector.cpp.

00383                                                                :
00384         zSelector(other)
00385 { }

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

Definition at line 188 of file zSelector.h.

00188 {};


Member Function Documentation

zSelector * zSelectorAnother::create (  )  [static]

Reimplemented from zSelector.

Definition at line 374 of file zSelector.cpp.

References zSelectorAnother().

00375 {
00376     return new zSelectorAnother();
00377 }

Here is the call graph for this function:

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

overloaded assignment operator

Definition at line 387 of file zSelector.cpp.

References zSelector::operator=().

00388 {
00389     this->zSelector::operator=(other);
00390 }

Here is the call graph for this function:

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

Reimplemented from zSelector.

Definition at line 392 of file zSelector.cpp.

References zSelectorAnother().

00393 {
00394     return new zSelectorAnother(*this);
00395 }

Here is the call graph for this function:

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

Reimplemented from zSelector.

Definition at line 397 of file zSelector.cpp.

References _alive, zSelector::getAllValid(), GrowingArrayBase::Len(), zSelector::pickOne(), eNetGameObject::Player(), gVectorExtra< T >::remove(), and se_PlayerNetIDs.

00398 {
00399     // Another single, randomly selected player that is the the one that
00400     // triggered the Zone receive the effect. This excludes the player
00401     // that triggered the Zone.
00402 
00403     gVectorExtra <ePlayerNetID *> allValidPlayer;
00404     gVectorExtra <ePlayerNetID *> anotherPlayer;
00405 
00406     gVectorExtra <ePlayerNetID *> allPlayer;
00407     for (int i=0; i<se_PlayerNetIDs.Len(); i++) {
00408         allPlayer.push_back( se_PlayerNetIDs(i) );
00409     }
00410 
00411     getAllValid(allValidPlayer, allPlayer, _alive);
00412 
00413     ePlayerNetID* triggererPlayer =  triggerer->Player();
00414     if (triggererPlayer != 0) {
00415         allValidPlayer.remove(triggererPlayer);
00416     }
00417 
00418     if(allValidPlayer.size() != 0)
00419         anotherPlayer.push_back(pickOne(allValidPlayer));
00420 
00421     return anotherPlayer;
00422 }

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