Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6313


Ignore:
Timestamp:
Dec 10, 2009, 8:49:33 AM (14 years ago)
Author:
scheusso
Message:

further network fixes
changed screenshot format from jpeg to tiff (lossless)

Location:
code/branches/presentation2/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/libraries/core/GraphicsManager.cc

    r6183 r6313  
    441441        assert(this->renderWindow_);
    442442       
    443         this->renderWindow_->writeContentsToTimestampedFile(PathConfig::getLogPathString() + "screenShot_", ".jpg");
     443        this->renderWindow_->writeContentsToTimestampedFile(PathConfig::getLogPathString() + "screenShot_", ".tiff");
    444444    }
    445445}
  • code/branches/presentation2/src/modules/weapons/projectiles/Rocket.cc

    r6295 r6313  
    8989        this->addCameraPosition(camPosition);
    9090
    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        }
    100108    }
    101109
  • code/branches/presentation2/src/orxonox/gamestates/GSMainMenu.cc

    r6302 r6313  
    6666            // Load sound
    6767            this->ambient_ = new AmbientSound(0);
     68            this->ambient_->setSyncMode(0x0);
    6869        }
    6970    }
  • code/branches/presentation2/src/orxonox/items/MultiStateEngine.cc

    r6222 r6313  
    5555        RegisterObject(MultiStateEngine);
    5656
    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        }
    6169
    6270        this->lua_ = new LuaState();
     
    7482                for (std::vector<WorldEntity*>::const_iterator it2 = (*it)->getEffectsBegin(); it2 != (*it)->getEffectsBegin(); ++it2)
    7583                    (*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_;
    7888            delete this->lua_;
    7989        }
     
    97107        if (this->getShip())
    98108        {
    99             if (this->getShip()->hasLocalController())
     109//             if (this->getShip()->hasLocalController())
     110            if (GameMode::isMaster() && this->getShip()->hasLocalController())
    100111            {
    101112                this->setSyncMode(ObjectDirection::Bidirectional);
     
    192203            return;
    193204
    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_);
    196209
    197210        for (std::vector<EffectContainer*>::const_iterator it = this->effectContainers_.begin(); it != this->effectContainers_.end(); ++it)
     
    226239    void MultiStateEngine::setDefEngSndNormal(const std::string &engineSound)
    227240    {
    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
    229245    }
    230246
    231247    const std::string& MultiStateEngine::getDefEngSndNormal()
    232248    {
    233         return defEngineSndNormal_->getSource();
     249        if( defEngineSndNormal_ )
     250            return defEngineSndNormal_->getSource();
     251        else
     252            assert(0);
     253        return std::string();
    234254    }
    235255
    236256    void MultiStateEngine::setDefEngSndBoost(const std::string &engineSound)
    237257    {
    238         defEngineSndBoost_->setSource(engineSound);
     258        if( defEngineSndBoost_ )
     259            defEngineSndBoost_->setSource(engineSound);
     260        else
     261            assert(0);
    239262    }
    240263
    241264    const std::string& MultiStateEngine::getDefEngSndBoost()
    242265    {
    243         return defEngineSndBoost_->getSource();
     266        if( this->defEngineSndBoost_ )
     267            return defEngineSndBoost_->getSource();
     268        else
     269            assert(0);
     270        return std::string();
    244271    }
    245272}
Note: See TracChangeset for help on using the changeset viewer.