Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 16, 2010, 12:37:09 PM (14 years ago)
Author:
dafrick
Message:

Documenting and cleanup.

File:
1 edited

Legend:

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

    r7540 r7547  
    3838#include "core/Template.h"
    3939#include "core/XMLPort.h"
     40
    4041#include "worldentities/pawns/Pawn.h"
     42
    4143#include "PickupManager.h"
    4244#include "PickupRepresentation.h"
     
    187189                PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it);
    188190                // 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)
    190192                {
    191                     this->trigger(*it);
     193                    if(carrier->isTarget(this->pickup_))
     194                        this->trigger(*it);
    192195                }
    193196            }
     
    270273        Returns the Pickupable that is spawned by this PickupSpawner.
    271274    */
    272     const Pickupable* PickupSpawner::getPickupable(void)
     275    const Pickupable* PickupSpawner::getPickupable(void) const
    273276    {
    274277        return this->pickup_;
Note: See TracChangeset for help on using the changeset viewer.