Changeset 7541 for code/trunk/src/modules/pickup/items/DronePickup.cc
- Timestamp:
- Oct 14, 2010, 12:55:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/pickup/items/DronePickup.cc
r7163 r7541 33 33 34 34 #include "DronePickup.h" 35 #include "worldentities/Drone.h" 36 #include "controllers/DroneController.h"35 36 #include <sstream> 37 37 38 38 #include "core/CoreIncludes.h" … … 40 40 #include "util/StringUtils.h" 41 41 42 #include "controllers/DroneController.h" 43 #include "pickup/PickupIdentifier.h" 42 44 #include "worldentities/pawns/Pawn.h" 43 #include "pickup/PickupIdentifier.h" 44 45 #include <sstream> 45 #include "worldentities/Drone.h" 46 #include "worldentities/StaticEntity.h" 46 47 47 48 namespace orxonox … … 104 105 } 105 106 107 /** 108 @brief 109 Set the droneTemplate. 110 @param templatename 111 The name of the Template to e set. 112 */ 106 113 void DronePickup::setDroneTemplate(std::string templatename){ 107 114 droneTemplate_ = templatename; 108 115 } 109 116 117 /** 118 @brief 119 Get the name of the droneTemplate. 120 @return 121 Returns the name of the droneTemplate. 122 */ 110 123 const std::string& DronePickup::getDroneTemplate() const 111 124 { … … 121 134 SUPER(DronePickup, changedUsed); 122 135 123 // !If the pickup is not picked up nothing must be done.136 // If the pickup is not picked up nothing must be done. 124 137 if(!this->isPickedUp()) 125 138 return; 126 139 127 // !If the pickup has transited to used.140 // If the pickup has transited to used. 128 141 if(this->isUsed()) 129 142 { 130 143 131 144 Pawn* pawn = this->carrierToPawnHelper(); 132 if(pawn == NULL) // !<If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed.145 if(pawn == NULL) // If the PickupCarrier is no Pawn, then this pickup is useless and therefore is destroyed. 133 146 this->Pickupable::destroy(); 134 147 … … 147 160 drone->setPosition(spawnPosition); 148 161 149 // !The pickup has been used up.162 // The pickup has been used up. 150 163 this->setUsed(false); 151 164 } 152 165 else 153 166 { 154 // !If either the pickup can only be used once or it is continuous and used up, it is destroyed upon setting it to unused.167 // If either the pickup can only be used once or it is continuous and used up, it is destroyed upon setting it to unused. 155 168 if(this->isOnce() || (this->isContinuous() )) 156 169 {
Note: See TracChangeset
for help on using the changeset viewer.