Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 974 for code/branches


Ignore:
Timestamp:
Apr 3, 2008, 12:52:48 PM (17 years ago)
Author:
scheusso
Message:

Made some adjustments because of synchronisable (mostly in skybox)

Location:
code/branches/network
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • code/branches/network/src/orxonox/objects/Model.cc

    r927 r974  
    8484
    8585    bool Model::create(){
    86       WorldEntity::create();
     86      if(!WorldEntity::create())
     87        return false;
    8788      if(meshSrc_.compare("")!=0){
    8889        this->mesh_.setMesh(meshSrc_);
  • code/branches/network/src/orxonox/objects/Skybox.cc

    r871 r974  
    4949    {
    5050        RegisterObject(Skybox);
     51        registerAllVariables();
    5152    }
    5253
     
    5960        if (xmlElem->Attribute("src"))
    6061        {
    61                 std::string skyboxSrc = xmlElem->Attribute("src");
    62                 this->setSkybox(skyboxSrc);
     62                skyboxSrc_ = xmlElem->Attribute("src");
     63        this->create();
    6364
    64                 COUT(4) << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
     65                COUT(4) << "Loader: Set skybox: "<< skyboxSrc_ << std::endl << std::endl;
    6566        }
    6667   }
     
    8384        XMLPortParamLoadOnly(Skybox, "src", setSkybox, xmlelement, loading);
    8485    }
     86   
     87    bool Skybox::create(){
     88      this->setSkybox(skyboxSrc_);
     89      return true;
     90    }
     91   
     92    void Skybox::registerAllVariables(){
     93      registerVar(&skyboxSrc_, skyboxSrc_.length()+1 ,network::STRING);
     94    }
     95   
    8596}
  • code/branches/network/src/orxonox/objects/Skybox.h

    r871 r974  
    55
    66#include "core/BaseObject.h"
     7#include "network/Synchronisable.h"
    78
    89class TiXmlElement; // Forward declaration
     
    1011namespace orxonox
    1112{
    12     class _OrxonoxExport Skybox : public BaseObject
     13    class _OrxonoxExport Skybox : public BaseObject, public network::Synchronisable
    1314    {
    1415        public:
     
    1920            virtual void XMLPort(Element& xmlelement, bool loading);
    2021            void setSkybox(const std::string& skyboxname);
     22           
     23            bool create();
     24            void registerAllVariables();
    2125
    2226        private:
     27            std::string skyboxSrc_;
    2328
    2429
  • code/branches/network/src/orxonox/objects/WorldEntity.cc

    r927 r974  
    7272        }
    7373    }
     74   
    7475
    7576    WorldEntity::~WorldEntity()
     
    162163*/
    163164    }
     165   
    164166
    165167    void WorldEntity::setYawPitchRoll(const Degree& yaw, const Degree& pitch, const Degree& roll)
Note: See TracChangeset for help on using the changeset viewer.