#include <zSelector.h>
Public Member Functions | |
zSelectorAllButSelf () | |
zSelectorAllButSelf (zSelectorAllButSelf const &other) | |
void | operator= (zSelectorAllButSelf const &other) |
overloaded assignment operator | |
virtual zSelectorAllButSelf * | copy (void) const |
virtual | ~zSelectorAllButSelf () |
gVectorExtra< ePlayerNetID * > | select (gVectorExtra< nNetObjectID > &owners, gVectorExtra< nNetObjectID > &teamOwners, gCycle *triggerer) |
Static Public Member Functions | |
static zSelector * | create () |
Definition at line 146 of file zSelector.h.
zSelectorAllButSelf::zSelectorAllButSelf | ( | ) |
Definition at line 279 of file zSelector.cpp.
Referenced by copy(), and create().
00279 : 00280 zSelector() 00281 { }
zSelectorAllButSelf::zSelectorAllButSelf | ( | zSelectorAllButSelf const & | other | ) |
virtual zSelectorAllButSelf::~zSelectorAllButSelf | ( | ) | [inline, virtual] |
zSelector * zSelectorAllButSelf::create | ( | ) | [static] |
Reimplemented from zSelector.
Definition at line 274 of file zSelector.cpp.
References zSelectorAllButSelf().
00275 { 00276 return new zSelectorAllButSelf(); 00277 }
void zSelectorAllButSelf::operator= | ( | zSelectorAllButSelf const & | other | ) |
overloaded assignment operator
Definition at line 287 of file zSelector.cpp.
References zSelector::operator=().
00288 { 00289 this->zSelector::operator=(other); 00290 }
zSelectorAllButSelf * zSelectorAllButSelf::copy | ( | void | ) | const [virtual] |
Reimplemented from zSelector.
Definition at line 292 of file zSelector.cpp.
References zSelectorAllButSelf().
00293 { 00294 return new zSelectorAllButSelf(*this); 00295 }
gVectorExtra< ePlayerNetID * > zSelectorAllButSelf::select | ( | gVectorExtra< nNetObjectID > & | owners, | |
gVectorExtra< nNetObjectID > & | teamOwners, | |||
gCycle * | triggerer | |||
) | [virtual] |
Reimplemented from zSelector.
Definition at line 297 of file zSelector.cpp.
References _alive, zSelector::getAllValid(), GrowingArrayBase::Len(), eNetGameObject::Player(), gVectorExtra< T >::remove(), and se_PlayerNetIDs.
00298 { 00299 // Everybody in the game but the player who triggered the 00300 // Zone receives the effect. This excludes the player 00301 // that triggered the Zone. 00302 00303 gVectorExtra<ePlayerNetID *> everybody; 00304 for (int i=0; i<se_PlayerNetIDs.Len(); i++) { 00305 everybody.push_back( se_PlayerNetIDs(i) ); 00306 } 00307 00308 gVectorExtra<ePlayerNetID *> everybodyValid; 00309 getAllValid(everybodyValid, everybody, _alive); 00310 // Remove the triggerer from the list of targets 00311 00312 ePlayerNetID* triggererPlayer = triggerer->Player(); 00313 if (triggererPlayer != 0) { 00314 everybodyValid.remove(triggererPlayer); 00315 } 00316 00317 return everybodyValid; 00318 }