Changeset 10557 for code/branches/core7/src/orxonox
- Timestamp:
- Aug 29, 2015, 6:18:30 PM (9 years ago)
- Location:
- code/branches/core7/src/orxonox
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/orxonox/gametypes/Dynamicmatch.cc
r9945 r10557 310 310 if (spaceship) 311 311 { 312 WeakPtr<SpaceShip>* ptr = new WeakPtr<SpaceShip>(spaceship);313 if(ptr == NULL)314 return;315 312 spaceship->addSpeedFactor(5); 316 313 ExecutorPtr executor = createExecutor(createFunctor(&Dynamicmatch::resetSpeedFactor, this)); 317 executor->setDefaultValue(0, ptr);314 executor->setDefaultValue(0, spaceship); 318 315 new Timer(10, false, executor, true); 319 316 } … … 593 590 } 594 591 595 void Dynamicmatch::resetSpeedFactor(WeakPtr<SpaceShip>* ptr)// helper function 596 { 597 if (*ptr) 598 { 599 (*ptr)->addSpeedFactor(1.0f/5.0f); 600 } 601 delete ptr; 592 void Dynamicmatch::resetSpeedFactor(SpaceShip* spaceship)// helper function 593 { 594 if (spaceship) 595 { 596 spaceship->addSpeedFactor(1.0f/5.0f); 597 } 602 598 } 603 599 -
code/branches/core7/src/orxonox/gametypes/Dynamicmatch.h
r9676 r10557 77 77 virtual void rewardPig(); 78 78 void grantPigBoost(SpaceShip* spaceship); // Grant the piggy a boost. 79 void resetSpeedFactor( WeakPtr<SpaceShip>* ptr);79 void resetSpeedFactor(SpaceShip* spaceship); 80 80 void tick (float dt);// used to end the game 81 81 SpawnPoint* getBestSpawnPoint(PlayerInfo* player) const; -
code/branches/core7/src/orxonox/infos/PlayerInfo.cc
r10362 r10557 186 186 187 187 this->controllableEntity_->destroyHud(); // HACK-ish 188 this->previousControllableEntity_.push_back( WeakPtr<ControllableEntity>(this->controllableEntity_));188 this->previousControllableEntity_.push_back(this->controllableEntity_); 189 189 this->controllableEntity_ = entity; 190 190 this->controllableEntityID_ = entity->getObjectID(); -
code/branches/core7/src/orxonox/interfaces/InterfaceCompilation.cc
r10362 r10557 72 72 { 73 73 assert(pawn); 74 this->pawn_ = WeakPtr<Pawn>(pawn);74 this->pawn_ = pawn; 75 75 if (pawn) 76 this->player_ = WeakPtr<PlayerInfo>(pawn->getPlayer());76 this->player_ = pawn->getPlayer(); 77 77 } 78 78 -
code/branches/core7/src/orxonox/sound/SoundManager.cc
r10555 r10557 419 419 } 420 420 421 void SoundManager::fadeIn( const StrongPtr<AmbientSound>&sound)421 void SoundManager::fadeIn(AmbientSound* sound) 422 422 { 423 423 // If we're already fading out --> remove that … … 435 435 } 436 436 437 void SoundManager::fadeOut( const StrongPtr<AmbientSound>&sound)437 void SoundManager::fadeOut(AmbientSound* sound) 438 438 { 439 439 // If we're already fading in --> remove that -
code/branches/core7/src/orxonox/sound/SoundManager.h
r10555 r10557 106 106 private: 107 107 void processCrossFading(float dt); 108 void fadeIn( const StrongPtr<AmbientSound>&sound);109 void fadeOut( const StrongPtr<AmbientSound>&sound);108 void fadeIn(AmbientSound* sound); 109 void fadeOut(AmbientSound* sound); 110 110 111 111 void checkFadeStepValidity();
Note: See TracChangeset
for help on using the changeset viewer.