#include <zSelector.h>
Public Member Functions | |
zSelectorAnother () | |
zSelectorAnother (zSelectorAnother const &other) | |
void | operator= (zSelectorAnother const &other) |
overloaded assignment operator | |
virtual zSelectorAnother * | copy (void) const |
virtual | ~zSelectorAnother () |
gVectorExtra< ePlayerNetID * > | select (gVectorExtra< nNetObjectID > &owners, gVectorExtra< nNetObjectID > &teamOwners, gCycle *triggerer) |
Static Public Member Functions | |
static zSelector * | create () |
Definition at line 180 of file zSelector.h.
zSelectorAnother::zSelectorAnother | ( | ) |
Definition at line 379 of file zSelector.cpp.
Referenced by copy(), and create().
00379 : 00380 zSelector() 00381 { }
zSelectorAnother::zSelectorAnother | ( | zSelectorAnother const & | other | ) |
virtual zSelectorAnother::~zSelectorAnother | ( | ) | [inline, virtual] |
zSelector * zSelectorAnother::create | ( | ) | [static] |
Reimplemented from zSelector.
Definition at line 374 of file zSelector.cpp.
References zSelectorAnother().
00375 { 00376 return new zSelectorAnother(); 00377 }
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 }
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 }
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 }