Changeset 9279 for code/branches/presentation2012merge/src/modules/pickup
- Timestamp:
- Jun 4, 2012, 10:50:28 PM (12 years ago)
- Location:
- code/branches/presentation2012merge/src/modules/pickup
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/src/modules/pickup/Pickup.cc
r8864 r9279 210 210 SUPER(Pickup, clone, item); 211 211 212 Pickup* pickup = dynamic_cast<Pickup*>(item);212 Pickup* pickup = orxonox_cast<Pickup*>(item); 213 213 pickup->setActivationTypeDirect(this->getActivationTypeDirect()); 214 214 pickup->setDurationTypeDirect(this->getDurationTypeDirect()); -
code/branches/presentation2012merge/src/modules/pickup/PickupCollection.cc
r8305 r9279 79 79 } 80 80 this->pickups_.clear(); 81 81 82 82 if(this->pickupCollectionIdentifier_ != NULL) 83 83 delete this->pickupCollectionIdentifier_; … … 195 195 return; 196 196 197 // If at least all the enabled pickups of this PickupCollection are no longer picked up. 197 // If at least all the enabled pickups of this PickupCollection are no longer picked up. 198 198 if(this->pickedUpCounter_ <= this->disabledCounter_ && this->isPickedUp()) 199 199 this->Pickupable::destroy(); … … 218 218 SUPER(PickupCollection, clone, item); 219 219 220 PickupCollection* pickup = dynamic_cast<PickupCollection*>(item);220 PickupCollection* pickup = orxonox_cast<PickupCollection*>(item); 221 221 // Clone all Pickupables this PickupCollection consist of. 222 222 for(std::vector<CollectiblePickup*>::iterator it = this->pickups_.begin(); it != this->pickups_.end(); it++) … … 297 297 This is used internally by the CollectiblePickup class. 298 298 @param changed 299 The value the used status has changed to. 299 The value the used status has changed to. 300 300 */ 301 301 void PickupCollection::pickupChangedUsed(bool changed) -
code/branches/presentation2012merge/src/modules/pickup/PickupSpawner.cc
r8891 r9279 199 199 200 200 Vector3 distance = it->getWorldPosition() - this->getWorldPosition(); 201 PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(*it);201 PickupCarrier* carrier = orxonox_cast<PickupCarrier*>(*it); 202 202 // If a PickupCarrier, that fits the target-range of the Pickupable spawned by this PickupSpawner, is in trigger-distance and the carrier is not blocked. 203 203 if(distance.length() < this->triggerDistance_ && carrier != NULL && this->blocked_.find(carrier) == this->blocked_.end()) … … 303 303 orxout(verbose, context::pickups) << "PickupSpawner (&" << this << ") triggered and active." << endl; 304 304 305 PickupCarrier* carrier = dynamic_cast<PickupCarrier*>(pawn);305 PickupCarrier* carrier = orxonox_cast<PickupCarrier*>(pawn); 306 306 assert(carrier); 307 307 -
code/branches/presentation2012merge/src/modules/pickup/items/DamageBoostPickup.cc
r9272 r9279 180 180 { 181 181 PickupCarrier* carrier = this->getCarrier(); 182 SpaceShip* ship = dynamic_cast<SpaceShip*>(carrier);182 SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier); 183 183 184 184 if(ship == NULL) … … 203 203 SUPER(DamageBoostPickup, clone, item); 204 204 205 DamageBoostPickup* pickup = dynamic_cast<DamageBoostPickup*>(item);205 DamageBoostPickup* pickup = orxonox_cast<DamageBoostPickup*>(item); 206 206 pickup->setDuration(this->getDuration()); 207 207 pickup->setDamageMultiplier(this->getDamageMultiplier()); -
code/branches/presentation2012merge/src/modules/pickup/items/DronePickup.cc
r8858 r9279 144 144 145 145 Controller* controller = drone->getController(); 146 DroneController* droneController = dynamic_cast<DroneController*>(controller);146 DroneController* droneController = orxonox_cast<DroneController*>(controller); 147 147 if(droneController != NULL) 148 148 { … … 175 175 { 176 176 PickupCarrier* carrier = this->getCarrier(); 177 Pawn* pawn = dynamic_cast<Pawn*>(carrier);177 Pawn* pawn = orxonox_cast<Pawn*>(carrier); 178 178 179 179 if(pawn == NULL) … … 198 198 SUPER(DronePickup, clone, item); 199 199 200 DronePickup* pickup = dynamic_cast<DronePickup*>(item);200 DronePickup* pickup = orxonox_cast<DronePickup*>(item); 201 201 pickup->setDroneTemplate(this->getDroneTemplate()); 202 202 -
code/branches/presentation2012merge/src/modules/pickup/items/HealthPickup.cc
r8864 r9279 230 230 { 231 231 PickupCarrier* carrier = this->getCarrier(); 232 Pawn* pawn = dynamic_cast<Pawn*>(carrier);232 Pawn* pawn = orxonox_cast<Pawn*>(carrier); 233 233 234 234 if(pawn == NULL) … … 264 264 { 265 265 PickupCarrier* carrier = this->getCarrier(); 266 Pawn* pawn = dynamic_cast<Pawn*>(carrier);266 Pawn* pawn = orxonox_cast<Pawn*>(carrier); 267 267 268 268 if(pawn == NULL) … … 285 285 SUPER(HealthPickup, clone, item); 286 286 287 HealthPickup* pickup = dynamic_cast<HealthPickup*>(item);287 HealthPickup* pickup = orxonox_cast<HealthPickup*>(item); 288 288 pickup->setHealth(this->getHealth()); 289 289 pickup->setHealthRate(this->getHealthRate()); -
code/branches/presentation2012merge/src/modules/pickup/items/InvisiblePickup.cc
r8858 r9279 159 159 SUPER(InvisiblePickup, clone, item); 160 160 161 InvisiblePickup* pickup = dynamic_cast<InvisiblePickup*>(item);161 InvisiblePickup* pickup = orxonox_cast<InvisiblePickup*>(item); 162 162 pickup->setDuration(this->getDuration()); 163 163 pickup->initializeIdentifier(); … … 202 202 { 203 203 PickupCarrier* carrier = this->getCarrier(); 204 Pawn* pawn = dynamic_cast<Pawn*>(carrier);204 Pawn* pawn = orxonox_cast<Pawn*>(carrier); 205 205 206 206 if(pawn == NULL) -
code/branches/presentation2012merge/src/modules/pickup/items/MetaPickup.cc
r8858 r9279 172 172 SUPER(MetaPickup, clone, item); 173 173 174 MetaPickup* pickup = dynamic_cast<MetaPickup*>(item);174 MetaPickup* pickup = orxonox_cast<MetaPickup*>(item); 175 175 pickup->setMetaTypeDirect(this->getMetaTypeDirect()); 176 176 -
code/branches/presentation2012merge/src/modules/pickup/items/ShieldPickup.cc
r8858 r9279 177 177 { 178 178 PickupCarrier* carrier = this->getCarrier(); 179 Pawn* pawn = dynamic_cast<Pawn*>(carrier);179 Pawn* pawn = orxonox_cast<Pawn*>(carrier); 180 180 181 181 if(pawn == NULL) … … 199 199 SUPER(ShieldPickup, clone, item); 200 200 201 ShieldPickup* pickup = dynamic_cast<ShieldPickup*>(item);201 ShieldPickup* pickup = orxonox_cast<ShieldPickup*>(item); 202 202 pickup->setDuration(this->getDuration()); 203 203 pickup->setShieldAbsorption(this->getShieldAbsorption()); -
code/branches/presentation2012merge/src/modules/pickup/items/ShrinkPickup.cc
r8713 r9279 148 148 { 149 149 SUPER(ShrinkPickup, changedPickedUp); 150 150 151 151 if(!this->isPickedUp() && this->isActive_) 152 152 { … … 271 271 272 272 bool destroy = false; 273 273 274 274 // Stop shrinking if the desired size is reached. 275 275 if(this->timeRemainig_ <= 0.0f) … … 314 314 { 315 315 PickupCarrier* carrier = this->getCarrier(); 316 Pawn* pawn = dynamic_cast<Pawn*>(carrier);316 Pawn* pawn = orxonox_cast<Pawn*>(carrier); 317 317 318 318 return pawn; … … 331 331 332 332 SUPER(ShrinkPickup, clone, item); 333 ShrinkPickup* pickup = dynamic_cast<ShrinkPickup*>(item);333 ShrinkPickup* pickup = orxonox_cast<ShrinkPickup*>(item); 334 334 pickup->setShrinkFactor(this->getShrinkFactor()); 335 335 pickup->setDuration(this->getDuration()); -
code/branches/presentation2012merge/src/modules/pickup/items/SpeedPickup.cc
r8858 r9279 176 176 { 177 177 PickupCarrier* carrier = this->getCarrier(); 178 SpaceShip* ship = dynamic_cast<SpaceShip*>(carrier);178 SpaceShip* ship = orxonox_cast<SpaceShip*>(carrier); 179 179 180 180 if(ship == NULL) … … 199 199 SUPER(SpeedPickup, clone, item); 200 200 201 SpeedPickup* pickup = dynamic_cast<SpeedPickup*>(item);201 SpeedPickup* pickup = orxonox_cast<SpeedPickup*>(item); 202 202 pickup->setDuration(this->getDuration()); 203 203 pickup->setSpeedAdd(this->getSpeedAdd());
Note: See TracChangeset
for help on using the changeset viewer.