Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6707 for code/branches/pickup4


Ignore:
Timestamp:
Apr 13, 2010, 8:46:20 AM (15 years ago)
Author:
dafrick
Message:

Found bug in PickupSpawner.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/pickup4/src/modules/pickup/PickupSpawner.cc

    r6563 r6707  
    180180            {
    181181                Vector3 distance = it->getWorldPosition() - this->getWorldPosition();
     182                PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it);
    182183                //! If a Pawn, that fits the target-range of the item spawned by this Pickup, is in trigger-distance.
    183                 if (distance.length() < this->triggerDistance_ && this->pickup_->isTarget(*it))
     184                if (distance.length() < this->triggerDistance_ && carrier != NULL && carrier->isTarget(this->pickup_))
    184185                {
    185186                    this->trigger(*it);
Note: See TracChangeset for help on using the changeset viewer.