Changeset 7547 for code/trunk/src/modules/pickup/PickupSpawner.cc
- Timestamp:
- Oct 16, 2010, 12:37:09 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pickup/PickupSpawner.cc
r7540 r7547 38 38 #include "core/Template.h" 39 39 #include "core/XMLPort.h" 40 40 41 #include "worldentities/pawns/Pawn.h" 42 41 43 #include "PickupManager.h" 42 44 #include "PickupRepresentation.h" … … 187 189 PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it); 188 190 // If a Pawn, that fits the target-range of the item spawned by this Pickup, is in trigger-distance. 189 if (distance.length() < this->triggerDistance_ && carrier != NULL && carrier->isTarget(this->pickup_))191 if (distance.length() < this->triggerDistance_ && carrier != NULL) 190 192 { 191 this->trigger(*it); 193 if(carrier->isTarget(this->pickup_)) 194 this->trigger(*it); 192 195 } 193 196 } … … 270 273 Returns the Pickupable that is spawned by this PickupSpawner. 271 274 */ 272 const Pickupable* PickupSpawner::getPickupable(void) 275 const Pickupable* PickupSpawner::getPickupable(void) const 273 276 { 274 277 return this->pickup_;
Note: See TracChangeset
for help on using the changeset viewer.