Changeset 9348 for code/trunk/src/orxonox/interfaces/Pickupable.cc
- Timestamp:
- Aug 30, 2012, 11:08:17 PM (12 years ago)
- Location:
- code/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:ignore
-
old new 1 .project 1 2 build 2 3 codeblocks 4 dependencies 3 5 vs 4 dependencies
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
code/trunk/src/orxonox/interfaces/Pickupable.cc
r8866 r9348 39 39 40 40 #include "infos/PlayerInfo.h" 41 #include "pickup/PickupIdentifier.h"42 41 #include "worldentities/pawns/Pawn.h" 43 42 … … 52 51 Constructor. Registers the objects and initializes its member variables. 53 52 */ 54 Pickupable::Pickupable() : pickupIdentifier_(NULL),used_(false), pickedUp_(false)53 Pickupable::Pickupable() : used_(false), pickedUp_(false) 55 54 { 56 55 RegisterRootObject(Pickupable); … … 58 57 this->carrier_ = NULL; 59 58 60 this->pickupIdentifier_ = new PickupIdentifier(this);61 59 this->beingDestroyed_ = false; 62 60 this->enabled_ = true; … … 69 67 Pickupable::~Pickupable() 70 68 { 71 if(this->pickupIdentifier_ != NULL)72 {73 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") destroyed." << endl;74 this->pickupIdentifier_->destroy();75 }76 69 } 77 70 … … 104 97 void Pickupable::destroyPickup(void) 105 98 { 106 if(!this-> beingDestroyed_)99 if(!this->isBeingDestroyed()) 107 100 this->OrxonoxClass::destroy(); 108 101 else … … 329 322 /** 330 323 @brief 331 Creates a duplicate of the Pickupable.332 @return333 Returns the clone of this pickup as a pointer to a Pickupable.334 */335 Pickupable* Pickupable::clone(void)336 {337 OrxonoxClass* item = NULL;338 this->clone(item);339 340 Pickupable* pickup = dynamic_cast<Pickupable*>(item);341 342 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << endl;343 return pickup;344 }345 346 /**347 @brief348 324 Method to transcribe a Pickupable as a Rewardable to the player. 349 325 @param player
Note: See TracChangeset
for help on using the changeset viewer.