src/tron/zone/zEffectGroup.cpp

Go to the documentation of this file.
00001 /*
00002 
00003 *************************************************************************
00004 
00005 ArmageTron -- Just another Tron Lightcycle Game in 3D.
00006 Copyright (C) 2000  Manuel Moos (manuel@moosnet.de)
00007 
00008 **************************************************************************
00009 
00010 This program is free software; you can redistribute it and/or
00011 modify it under the terms of the GNU General Public License
00012 as published by the Free Software Foundation; either version 2
00013 of the License, or (at your option) any later version.
00014 
00015 This program is distributed in the hope that it will be useful,
00016 but WITHOUT ANY WARRANTY; without even the implied warranty of
00017 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018 GNU General Public License for more details.
00019 
00020 You should have received a copy of the GNU General Public License
00021 along with this program; if not, write to the Free Software
00022 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00023 
00024 ***************************************************************************
00025 
00026 */
00027 
00028 #include "zone/zEffectGroup.h"
00029 
00030 zEffectGroup::zEffectGroup(gVectorExtra< nNetObjectID > const owners, gVectorExtra< nNetObjectID > const teamOwners):
00031         validators(),
00032         //      monitorInfluences(),
00033         //      zoneInfluences(),
00034         d_owners(owners),
00035         d_teamOwners(teamOwners),
00036         d_calculatedTargets()
00037 { }
00038 
00039 zEffectGroup::zEffectGroup(zEffectGroup const &other) :
00040         validators(other.validators),
00041         //      monitorInfluences(other.monitorInfluences),
00042         //      zoneInfluences(other.zoneInfluences),
00043         d_owners(other.d_owners),
00044         d_teamOwners(other.d_teamOwners),
00045         d_calculatedTargets(other.d_calculatedTargets)
00046 { }
00047 
00048 zEffectGroup::~zEffectGroup()
00049 { }
00050 
00051 void zEffectGroup::operator=(zEffectGroup const &other)
00052 {
00053     if (this != &other) {
00054         validators = other.validators;
00055         d_owners = other.d_owners;
00056         d_teamOwners = other.d_teamOwners;
00057         d_calculatedTargets = other.d_calculatedTargets;
00058     }
00059 }
00060 
00061 void zEffectGroup::apply( Triggerer possibleUser, REAL &time, const tPolynomial<nMessage> & tp )
00062 {
00063     std::vector<zValidatorPtr>::const_iterator iter;
00064     for (iter=validators.begin();
00065             iter!=validators.end();
00066             ++iter)
00067     {
00068         (*iter)->validate(d_owners, d_teamOwners, possibleUser, tp);
00069     }
00070 }

Generated on Sat Mar 15 22:56:11 2008 for Armagetron Advanced by  doxygen 1.5.4