Changeset 9279 for code/branches
- Timestamp:
- Jun 4, 2012, 10:50:28 PM (12 years ago)
- Location:
- code/branches/presentation2012merge/src
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2012merge/src/libraries/core/Super.h
r8866 r9279 398 398 inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) \ 399 399 { \ 400 ( dynamic_cast<T*>(object))->T:: functionname400 (orxonox_cast<T*>(object))->T:: functionname 401 401 402 402 /* … … 508 508 inline void operator()( SUPER_CALL_ARGUMENTS##hasarguments(__VA_ARGS__) ) 509 509 { 510 ( dynamic_cast<T*>(object))->T:: functionname ( Call the function with it's arguments );510 (orxonox_cast<T*>(object))->T:: functionname ( Call the function with it's arguments ); 511 511 } 512 512 -
code/branches/presentation2012merge/src/libraries/core/XMLPort.h
r8858 r9279 197 197 ClassIdentifier<classname>::getIdentifier()->addXMLPortParamContainer(paramname, containername); \ 198 198 } \ 199 containername->port( dynamic_cast<BaseObject*>(this), object, xmlelement, mode)199 containername->port(orxonox_cast<BaseObject*>(this), object, xmlelement, mode) 200 200 201 201 // -------------------- -
code/branches/presentation2012merge/src/modules/overlays/hud/HUDNavigation.cc
r9257 r9279 427 427 bool HUDNavigation::showObject(RadarViewable* rv) 428 428 { 429 if ( rv == dynamic_cast<RadarViewable*> ( this->getOwner() ) )429 if ( rv == orxonox_cast<RadarViewable*> ( this->getOwner() ) ) 430 430 return false; 431 431 assert( rv->getWorldEntity() ); -
code/branches/presentation2012merge/src/modules/overlays/hud/HUDRadar.cc
r8891 r9279 92 92 void HUDRadar::addObject(RadarViewable* object) 93 93 { 94 if (object == dynamic_cast<RadarViewable*>(this->owner_))94 if (object == orxonox_cast<RadarViewable*>(this->owner_)) 95 95 return; 96 96 if( showObject(object) == false ) //do not show objects that are "invisible" or "radar invisible" … … 189 189 bool HUDRadar::showObject(RadarViewable* rv) 190 190 { 191 if ( rv == dynamic_cast<RadarViewable*> ( this->getOwner() ) )191 if ( rv == orxonox_cast<RadarViewable*> ( this->getOwner() ) ) 192 192 return false; 193 193 assert( rv->getWorldEntity() ); -
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()); -
code/branches/presentation2012merge/src/modules/weapons/RocketController.cc
r8858 r9279 53 53 this->rocket_ = new SimpleRocket(this); 54 54 this->rocket_->setController(this); 55 this->setControllableEntity( dynamic_cast<ControllableEntity*>(this->rocket_));55 this->setControllableEntity(orxonox_cast<ControllableEntity*>(this->rocket_)); 56 56 } 57 57 -
code/branches/presentation2012merge/src/orxonox/controllers/NewHumanController.cc
r9016 r9279 298 298 //Used in HumanController for formationFlight 299 299 HumanController::hit(originator,contactpoint,damage); 300 300 301 301 if (this->showDamageOverlay_ && !this->controlPaused_ && this->controllableEntity_ && !this->controllableEntity_->isInMouseLook()) 302 302 { … … 397 397 try 398 398 { 399 wePtr = dynamic_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(itr->movable->getUserAny()));399 wePtr = orxonox_cast<WorldEntity*>(Ogre::any_cast<OrxonoxClass*>(itr->movable->getUserAny())); 400 400 } 401 401 catch (...) -
code/branches/presentation2012merge/src/orxonox/gamestates/GSRoot.cc
r8858 r9279 76 76 for (ObjectList<BaseObject>::iterator it = ObjectList<BaseObject>::begin(); it; ++it) 77 77 { 78 if (dynamic_cast<Synchronisable*>(*it)) 79 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << " id: " << dynamic_cast<Synchronisable*>(*it)->getObjectID() << endl; 78 Synchronisable* synchronisable = orxonox_cast<Synchronisable*>(*it); 79 if (synchronisable) 80 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << " id: " << synchronisable->getObjectID() << endl; 80 81 else 81 82 orxout(debug_output) << "object: " << it->getIdentifier()->getName() << endl; -
code/branches/presentation2012merge/src/orxonox/gametypes/Dynamicmatch.cc
r8858 r9279 151 151 152 152 //Give new pig boost 153 SpaceShip* spaceship = dynamic_cast<SpaceShip*>(victim);153 SpaceShip* spaceship = orxonox_cast<SpaceShip*>(victim); 154 154 this->grantPigBoost(spaceship); 155 155 } … … 245 245 } 246 246 //Give new pig boost 247 SpaceShip* spaceship = dynamic_cast<SpaceShip*>(victim);247 SpaceShip* spaceship = orxonox_cast<SpaceShip*>(victim); 248 248 this->grantPigBoost(spaceship); 249 249 } … … 426 426 { 427 427 std::map<PlayerInfo*, int>::const_iterator it_player = this->playerParty_.find(player); 428 Pawn* pawn = dynamic_cast<Pawn*>(player->getControllableEntity());428 Pawn* pawn = orxonox_cast<Pawn*>(player->getControllableEntity()); 429 429 if (pawn) 430 430 { -
code/branches/presentation2012merge/src/orxonox/gametypes/LastManStanding.cc
r8858 r9279 211 211 if(!player->getControllableEntity()) 212 212 return; 213 Pawn* pawn = dynamic_cast<Pawn*>(player->getControllableEntity());213 Pawn* pawn = orxonox_cast<Pawn*>(player->getControllableEntity()); 214 214 if(!pawn) 215 215 return; -
code/branches/presentation2012merge/src/orxonox/gametypes/LastTeamStanding.cc
r8858 r9279 283 283 if(!player->getControllableEntity()) 284 284 return; 285 Pawn* pawn = dynamic_cast<Pawn*>(player->getControllableEntity());285 Pawn* pawn = orxonox_cast<Pawn*>(player->getControllableEntity()); 286 286 if(!pawn) 287 287 return; -
code/branches/presentation2012merge/src/orxonox/interfaces/Pickupable.cc
r8866 r9279 338 338 this->clone(item); 339 339 340 Pickupable* pickup = dynamic_cast<Pickupable*>(item);340 Pickupable* pickup = orxonox_cast<Pickupable*>(item); 341 341 342 342 orxout(verbose, context::pickups) << "Pickupable (&" << this << ") cloned. Clone is new Pickupable (&" << pickup << ")." << endl; -
code/branches/presentation2012merge/src/orxonox/worldentities/ControllableEntity.cc
r9272 r9279 266 266 this->cameraPositionRootNode_->_update(true, false); // update the camera node because otherwise the camera will drag back in position which looks strange 267 267 268 NewHumanController* controller = dynamic_cast<NewHumanController*>(this->getController());268 NewHumanController* controller = orxonox_cast<NewHumanController*>(this->getController()); 269 269 if (controller) 270 270 controller->centerCursor();
Note: See TracChangeset
for help on using the changeset viewer.