Changeset 6707 for code/branches/pickup4/src
- Timestamp:
- Apr 13, 2010, 8:46:20 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pickup4/src/modules/pickup/PickupSpawner.cc
r6563 r6707 180 180 { 181 181 Vector3 distance = it->getWorldPosition() - this->getWorldPosition(); 182 PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it); 182 183 //! 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_)) 184 185 { 185 186 this->trigger(*it);
Note: See TracChangeset
for help on using the changeset viewer.