Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 31, 2010, 11:31:37 PM (14 years ago)
Author:
dafrick
Message:

Improving documentation for MultiTriggers, also some small bugfixes, simplifications and added features.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/modules/objects/triggers/DistanceTrigger.cc

    r7163 r7301  
    129129        continue;
    130130
     131      // If the DistanceTrigger is in single-target mode.
    131132      if(this->singleTargetMode_)
    132133      {
     134        // If the object that is a target is no DistanceTriggerBeacon, then the DistanceTrigger can't be in single-target-mode.
    133135        if(!(*it)->isA(ClassIdentifier<DistanceTriggerBeacon>::getIdentifier()))
     136        {
    134137          this->singleTargetMode_ = false;
     138          COUT(2) << "DistanceTrigger " << this->getName() << " (&" << this <<  ")" << "is in single-target mode but the target is '" << entity->getIdentifier()->getName() << "' instead of DistanceTriggerBeacon. Setting single-target mode to false." << std::endl;
     139        }
     140        // If the target name and the name of the DistancTriggerBeacon don't match.
    135141        else if(entity->getName().compare(this->targetName_) != 0)
    136142          continue;
     
    145151        {
    146152
     153          // Change the entity to the parent of the DistanceTriggerBeacon (if in single-target-mode), which is the entity to which the beacon is attached.
    147154          if(this->singleTargetMode_)
    148155            entity = entity->getParent();
Note: See TracChangeset for help on using the changeset viewer.