Changeset 6313 for code/branches/presentation2
- Timestamp:
- Dec 10, 2009, 8:49:33 AM (15 years ago)
- Location:
- code/branches/presentation2/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/presentation2/src/libraries/core/GraphicsManager.cc
r6183 r6313 441 441 assert(this->renderWindow_); 442 442 443 this->renderWindow_->writeContentsToTimestampedFile(PathConfig::getLogPathString() + "screenShot_", ". jpg");443 this->renderWindow_->writeContentsToTimestampedFile(PathConfig::getLogPathString() + "screenShot_", ".tiff"); 444 444 } 445 445 } -
code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc
r6295 r6313 89 89 this->addCameraPosition(camPosition); 90 90 91 this->defSndWpnEngine_ = new WorldSound(this); 92 this->defSndWpnEngine_->setLooping(true); 93 this->defSndWpnEngine_->setSource("sounds/Rocket_engine.ogg"); 94 this->attach(defSndWpnEngine_); 95 96 this->defSndWpnLaunch_ = new WorldSound(this); 97 this->defSndWpnLaunch_->setLooping(false); 98 this->defSndWpnLaunch_->setSource("sounds/Rocket_launch.ogg"); 99 this->attach(defSndWpnLaunch_); 91 if( GameMode::isMaster() ) 92 { 93 this->defSndWpnEngine_ = new WorldSound(this); 94 this->defSndWpnEngine_->setLooping(true); 95 this->defSndWpnEngine_->setSource("sounds/Rocket_engine.ogg"); 96 this->attach(defSndWpnEngine_); 97 98 this->defSndWpnLaunch_ = new WorldSound(this); 99 this->defSndWpnLaunch_->setLooping(false); 100 this->defSndWpnLaunch_->setSource("sounds/Rocket_launch.ogg"); 101 this->attach(defSndWpnLaunch_); 102 } 103 else 104 { 105 this->defSndWpnEngine_ = 0; 106 this->defSndWpnLaunch_ = 0; 107 } 100 108 } 101 109 -
code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc
r6302 r6313 66 66 // Load sound 67 67 this->ambient_ = new AmbientSound(0); 68 this->ambient_->setSyncMode(0x0); 68 69 } 69 70 } -
code/branches/presentation2/src/orxonox/items/MultiStateEngine.cc
r6222 r6313 55 55 RegisterObject(MultiStateEngine); 56 56 57 this->defEngineSndNormal_ = new WorldSound(this); 58 this->defEngineSndBoost_ = new WorldSound(this); 59 this->defEngineSndNormal_->setLooping(true); 60 this->defEngineSndBoost_->setLooping(true); 57 if( GameMode::isMaster() ) 58 { 59 this->defEngineSndNormal_ = new WorldSound(this); 60 this->defEngineSndBoost_ = new WorldSound(this); 61 this->defEngineSndNormal_->setLooping(true); 62 this->defEngineSndBoost_->setLooping(true); 63 } 64 else 65 { 66 this->defEngineSndBoost_ = 0; 67 this->defEngineSndNormal_ = 0; 68 } 61 69 62 70 this->lua_ = new LuaState(); … … 74 82 for (std::vector<WorldEntity*>::const_iterator it2 = (*it)->getEffectsBegin(); it2 != (*it)->getEffectsBegin(); ++it2) 75 83 (*it2)->destroy(); 76 delete this->defEngineSndNormal_; 77 delete this->defEngineSndBoost_; 84 if( this->defEngineSndNormal_ ) 85 delete this->defEngineSndNormal_; 86 if( this->defEngineSndBoost_ ) 87 delete this->defEngineSndBoost_; 78 88 delete this->lua_; 79 89 } … … 97 107 if (this->getShip()) 98 108 { 99 if (this->getShip()->hasLocalController()) 109 // if (this->getShip()->hasLocalController()) 110 if (GameMode::isMaster() && this->getShip()->hasLocalController()) 100 111 { 101 112 this->setSyncMode(ObjectDirection::Bidirectional); … … 192 203 return; 193 204 194 this->getShip()->attach(defEngineSndNormal_); 195 this->getShip()->attach(defEngineSndBoost_); 205 if( this->defEngineSndNormal_ ) 206 this->getShip()->attach(defEngineSndNormal_); 207 if( this->defEngineSndBoost_ ) 208 this->getShip()->attach(defEngineSndBoost_); 196 209 197 210 for (std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it) … … 226 239 void MultiStateEngine::setDefEngSndNormal(const std::string &engineSound) 227 240 { 228 defEngineSndNormal_->setSource(engineSound); 241 if( defEngineSndNormal_ ) 242 defEngineSndNormal_->setSource(engineSound); 243 else 244 assert(0); // This should never happen, because soundpointer is only available on master 229 245 } 230 246 231 247 const std::string& MultiStateEngine::getDefEngSndNormal() 232 248 { 233 return defEngineSndNormal_->getSource(); 249 if( defEngineSndNormal_ ) 250 return defEngineSndNormal_->getSource(); 251 else 252 assert(0); 253 return std::string(); 234 254 } 235 255 236 256 void MultiStateEngine::setDefEngSndBoost(const std::string &engineSound) 237 257 { 238 defEngineSndBoost_->setSource(engineSound); 258 if( defEngineSndBoost_ ) 259 defEngineSndBoost_->setSource(engineSound); 260 else 261 assert(0); 239 262 } 240 263 241 264 const std::string& MultiStateEngine::getDefEngSndBoost() 242 265 { 243 return defEngineSndBoost_->getSource(); 266 if( this->defEngineSndBoost_ ) 267 return defEngineSndBoost_->getSource(); 268 else 269 assert(0); 270 return std::string(); 244 271 } 245 272 }
Note: See TracChangeset
for help on using the changeset viewer.