#include <zSelector.h>
Public Member Functions | |
zSelectorOwnerTeam () | |
zSelectorOwnerTeam (zSelectorOwnerTeam const &other) | |
void | operator= (zSelectorOwnerTeam const &other) |
overloaded assignment operator | |
virtual zSelectorOwnerTeam * | copy (void) const |
virtual | ~zSelectorOwnerTeam () |
gVectorExtra< ePlayerNetID * > | select (gVectorExtra< nNetObjectID > &owners, gVectorExtra< nNetObjectID > &teamOwners, gCycle *triggerer) |
Static Public Member Functions | |
static zSelector * | create () |
Definition at line 219 of file zSelector.h.
zSelectorOwnerTeam::zSelectorOwnerTeam | ( | ) |
Definition at line 480 of file zSelector.cpp.
Referenced by copy(), and create().
00480 : 00481 zSelector() 00482 { }
zSelectorOwnerTeam::zSelectorOwnerTeam | ( | zSelectorOwnerTeam const & | other | ) |
virtual zSelectorOwnerTeam::~zSelectorOwnerTeam | ( | ) | [inline, virtual] |
zSelector * zSelectorOwnerTeam::create | ( | ) | [static] |
Reimplemented from zSelector.
Definition at line 475 of file zSelector.cpp.
References zSelectorOwnerTeam().
00476 { 00477 return new zSelectorOwnerTeam(); 00478 }
void zSelectorOwnerTeam::operator= | ( | zSelectorOwnerTeam const & | other | ) |
overloaded assignment operator
Definition at line 488 of file zSelector.cpp.
References zSelector::operator=().
00489 { 00490 this->zSelector::operator=(other); 00491 }
zSelectorOwnerTeam * zSelectorOwnerTeam::copy | ( | void | ) | const [virtual] |
Reimplemented from zSelector.
Definition at line 493 of file zSelector.cpp.
References zSelectorOwnerTeam().
00494 { 00495 return new zSelectorOwnerTeam(*this); 00496 }
gVectorExtra< ePlayerNetID * > zSelectorOwnerTeam::select | ( | gVectorExtra< nNetObjectID > & | owners, | |
gVectorExtra< nNetObjectID > & | teamOwners, | |||
gCycle * | triggerer | |||
) | [virtual] |
Reimplemented from zSelector.
Definition at line 498 of file zSelector.cpp.
References _alive, eTeam::GetAllMembers(), zSelector::getAllValid(), gVectorExtra< T >::insertAll(), and sn_netObjects.
00499 { 00500 // The members of the team that owns the Zone receives the 00501 // effect upon trigger, irrelevantly of the user who triggers it. 00502 00503 // Pick all the members of the teams 00504 gVectorExtra <ePlayerNetID *> allOwnerTeamMembers; 00505 gVectorExtra< nNetObjectID >::const_iterator iter; 00506 for(iter = teamOwners.begin(); 00507 iter != teamOwners.end(); 00508 ++iter) 00509 { 00510 // Is the object still there 00511 if(bool(sn_netObjects[(*iter)])) 00512 { 00513 eTeam * aTeam = static_cast< eTeam* >( static_cast< nNetObject* >( sn_netObjects[ (*iter) ] ) ) ; 00514 if(aTeam != 0) 00515 allOwnerTeamMembers.insertAll(aTeam->GetAllMembers()); 00516 00517 } 00518 } 00519 00520 // Keep only the valid ones 00521 gVectorExtra <ePlayerNetID *> OwnerTeamMembers; 00522 getAllValid(OwnerTeamMembers, allOwnerTeamMembers, _alive); 00523 00524 return OwnerTeamMembers; 00525 }