Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2010, 1:08:58 PM (15 years ago)
Author:
scheusso
Message:
  • merged network2 branch into presentation3 branch (lots of network traffic and cpu load improvements)
  • fixed network related bugs in BigExplosion
Location:
code/branches/presentation3
Files:
34 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation3

  • code/branches/presentation3/src/orxonox/CMakeLists.txt

    r7152 r7153  
    3434  ChatHistory.cc
    3535  ChatInputHandler.cc
     36#  Test.cc
    3637COMPILATION_BEGIN SceneCompilation.cc
    3738  CameraManager.cc
  • code/branches/presentation3/src/orxonox/Level.h

    r7105 r7153  
    4848
    4949            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    50             void registerVariables();
    5150
    5251            inline void setDescription(const std::string& description)
     
    6261
    6362        private:
     63            void registerVariables();
    6464            void addObject(BaseObject* object);
    6565            BaseObject* getObject(unsigned int index) const;
  • code/branches/presentation3/src/orxonox/Test.h

    r7105 r7153  
    5050
    5151      void setConfigValues();
    52       void registerVariables();
    5352
    5453      static void call(unsigned int clientID);
     
    8786
    8887    private:
     88      void registerVariables();
     89
    8990      UTYPE u1;
    9091      UTYPE u2;
  • code/branches/presentation3/src/orxonox/collisionshapes/CollisionShape.h

    r5781 r7153  
    4545
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             void registerVariables();
    4847
    4948            inline void setPosition(const Vector3& position)
     
    8887
    8988        private:
     89            void registerVariables();
     90
    9091            Vector3                 position_;
    9192            Quaternion              orientation_;
  • code/branches/presentation3/src/orxonox/graphics/Backlight.h

    r5781 r7153  
    4545
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             void registerVariables();
    4847
    4948            virtual void tick(float dt);
     
    8180
    8281        private:
     82            void registerVariables();
    8383            virtual void startturnonoff();
    8484            virtual void stopturnonoff();
  • code/branches/presentation3/src/orxonox/graphics/Billboard.h

    r5781 r7153  
    4646
    4747            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             void registerVariables();
    4948
    5049            virtual void changedVisibility();
     
    7877
    7978        private:
     79            void registerVariables();
    8080            void changedMaterial();
    8181//            void changedRotation();
  • code/branches/presentation3/src/orxonox/graphics/BlinkingBillboard.cc

    r6417 r7153  
    6666    void BlinkingBillboard::registerVariables()
    6767    {
    68 //        registerVariable(this->amplitude_, VariableDirection::ToClient);
    69 //        registerVariable(this->frequency_, VariableDirection::ToClient);
    70 //        registerVariable(this->phase_,     VariableDirection::ToClient);
     68        unregisterVariable(this->getScale3D());
     69        registerVariable(this->amplitude_,  VariableDirection::ToClient);
     70        registerVariable(this->frequency_,  VariableDirection::ToClient);
     71        registerVariable(this->phase_,      VariableDirection::ToClient);
     72        registerVariable(this->bQuadratic_, VariableDirection::ToClient);
    7173    }
    7274
     
    7577        SUPER(BlinkingBillboard, tick, dt);
    7678
    77         if (GameMode::isMaster() && this->isActive())
     79        if (this->isActive())
    7880        {
    7981            this->time_ += dt;
  • code/branches/presentation3/src/orxonox/graphics/BlinkingBillboard.h

    r5781 r7153  
    4545
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             void registerVariables();
    4847
    4948            virtual void tick(float dt);
     
    7069
    7170        private:
     71            void registerVariables();
     72           
    7273            float amplitude_;
    7374            float frequency_;
  • code/branches/presentation3/src/orxonox/graphics/FadingBillboard.h

    r5929 r7153  
    4646
    4747            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             void registerVariables();
    4948
    5049            virtual void tick(float dt);
     
    6665
    6766        protected:
     67            void registerVariables();
    6868            virtual void startturnonoff();
    6969            virtual void stopturnonoff();
  • code/branches/presentation3/src/orxonox/graphics/GlobalShader.h

    r5781 r7153  
    4545
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             void registerVariables();
    4847
    4948            virtual void changedVisibility();
     
    5352
    5453        private:
     54            void registerVariables();
    5555            void changedCompositor();
    5656
  • code/branches/presentation3/src/orxonox/graphics/Light.h

    r5781 r7153  
    5757
    5858            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    59             void registerVariables();
    6059
    6160            virtual void changedVisibility();
     
    132131
    133132        private:
     133            void registerVariables();
    134134            void setTypeString(const std::string& type);
    135135            std::string getTypeString() const;
  • code/branches/presentation3/src/orxonox/graphics/Model.h

    r7127 r7153  
    4545
    4646            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    47             void registerVariables();
    4847
    4948            virtual void changedVisibility();
     
    6362
    6463        protected:
     64            void registerVariables();
    6565            void changedMesh();
    6666            void changedShadows();
  • code/branches/presentation3/src/orxonox/graphics/ParticleEmitter.h

    r5781 r7153  
    4444
    4545            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    46             void registerVariables();
    4746
    4847            virtual void changedVisibility();
     
    7473            std::string        source_;
    7574            LODParticle::Value   LOD_;
     75
     76        private:
     77            void registerVariables();
    7678    };
    7779}
  • code/branches/presentation3/src/orxonox/infos/GametypeInfo.h

    r7062 r7153  
    4545            virtual ~GametypeInfo();
    4646
    47             void registerVariables();
    48 
    4947            inline bool hasStarted() const
    5048                { return this->bStarted_; }
     
    7472
    7573        private:
     74            void registerVariables();
     75
    7676            bool bStarted_;
    7777            bool bEnded_;
  • code/branches/presentation3/src/orxonox/infos/HumanPlayer.h

    r5781 r7153  
    4343            virtual ~HumanPlayer();
    4444
    45             void registerVariables();
    4645            void setConfigValues();
    4746
     
    101100            std::string gametypeHudTemplate_;
    102101            OverlayGroup* gametypeHud_;
     102        private:
     103            void registerVariables();
    103104    };
    104105}
  • code/branches/presentation3/src/orxonox/infos/PlayerInfo.h

    r7072 r7153  
    4343            PlayerInfo(BaseObject* creator);
    4444            virtual ~PlayerInfo();
    45 
    46             void registerVariables();
    4745
    4846            virtual void changedName();
     
    9290
    9391        private:
     92            void registerVariables();
    9493            void networkcallback_changedcontrollableentityID();
    9594            void networkcallback_changedgtinfoID();
  • code/branches/presentation3/src/orxonox/items/Engine.h

    r6711 r7153  
    4646
    4747            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    48             void registerVariables();
    4948            void setConfigValues();
    5049
     
    127126
    128127        private:
     128            void registerVariables();
    129129            void networkcallback_shipID();
    130130
  • code/branches/presentation3/src/orxonox/items/MultiStateEngine.h

    r6417 r7153  
    5353
    5454            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    55             void registerVariables();
    5655
    5756            virtual void tick(float dt);
     
    6867
    6968        private:
     69            void registerVariables();
     70
    7071            int state_;
    7172            int oldState_;
  • code/branches/presentation3/src/orxonox/sound/BaseSound.cc

    r6502 r7153  
    248248        else // No source acquired so far, but might be set to playing or paused
    249249        {
    250             State state = this->state_; // save
     250            State state = static_cast<State>(this->state_); // save
    251251            if (this->isPlaying() || this->isPaused())
    252252                doPlay();
  • code/branches/presentation3/src/orxonox/sound/BaseSound.h

    r6417 r7153  
    112112        float           volume_;
    113113        bool            bLooping_;
    114         State           state_;
     114        uint8_t         state_;       // This Variable is actually of type State
    115115        float           pitch_;
    116116
  • code/branches/presentation3/src/orxonox/sound/WorldSound.cc

    r6417 r7153  
    5858        registerVariable(bLooping_, ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::loopingChanged));
    5959        registerVariable(pitch_,    ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::pitchChanged));
    60         registerVariable((int&)(BaseSound::state_), ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::stateChanged));
     60        registerVariable((uint8_t&)(BaseSound::state_), ObjectDirection::ToClient, new NetworkCallback<WorldSound>(this, &WorldSound::stateChanged));
    6161    }
    6262
  • code/branches/presentation3/src/orxonox/worldentities/BigExplosion.cc

    r5929 r7153  
    101101        this->debrisEntity3_ = new MovableEntity(this);
    102102        this->debrisEntity4_ = new MovableEntity(this);
     103       
     104        this->debrisEntity1_->setSyncMode(0);
     105        this->debrisEntity2_->setSyncMode(0);
     106        this->debrisEntity3_->setSyncMode(0);
     107        this->debrisEntity4_->setSyncMode(0);
    103108
    104109        this->debris1_ = new Model(this);
     
    106111        this->debris3_ = new Model(this);
    107112        this->debris4_ = new Model(this);
     113       
     114        this->debris1_->setSyncMode(0);
     115        this->debris2_->setSyncMode(0);
     116        this->debris3_->setSyncMode(0);
     117        this->debris4_->setSyncMode(0);
    108118
    109119        this->explosion_ = new StaticEntity(this);
     120        this->explosion_->setSyncMode(0);
    110121
    111122        this->debrisSmoke1_ = new ParticleInterface(this->getScene()->getSceneManager(), "Orxonox/smoke7", this->LOD_);
     
    158169        effect->setSource("Orxonox/explosion2b");
    159170        effect->setLifetime(4.0f);
     171        effect->setSyncMode(0);
    160172
    161173        ParticleSpawner* effect2 = new ParticleSpawner(this->getCreator());
     
    163175        effect2->setSource("Orxonox/smoke6");
    164176        effect2->setLifetime(4.0f);
     177        effect2->setSyncMode(0);
    165178
    166179        this->explosion_->attach(effect);
     
    181194            MovableEntity* partEntity1 = new MovableEntity(this);
    182195            MovableEntity* partEntity2 = new MovableEntity(this);
     196           
     197            part1->setSyncMode(0);
     198            part2->setSyncMode(0);
     199            partEntity1->setSyncMode(0);
     200            partEntity2->setSyncMode(0);
    183201
    184202            partEntity1->setVelocity(Vector3(rnd(-1, 1), rnd(-1, 1), rnd(-1, 1))*rnd(10,100));
  • code/branches/presentation3/src/orxonox/worldentities/BigExplosion.h

    r5929 r7153  
    4545
    4646            virtual void tick(float dt);
    47             void registerVariables();
    4847
    4948            inline void setLOD(LODParticle::Value level)
     
    5352
    5453        private:
     54            void registerVariables();
    5555
    5656            void LODchanged();
  • code/branches/presentation3/src/orxonox/worldentities/ControllableEntity.h

    r7073 r7153  
    4949            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5050            virtual void tick(float dt);
    51             void registerVariables();
    5251            void setConfigValues();
    5352
     
    167166
    168167        private:
     168            void registerVariables();
    169169            void setXMLController(Controller* controller);
    170170
  • code/branches/presentation3/src/orxonox/worldentities/ExplosionChunk.h

    r5929 r7153  
    4444
    4545            virtual void tick(float dt);
    46             void registerVariables();
    4746
    4847            inline void setLOD(LODParticle::Value level)
     
    5251
    5352        private:
     53            void registerVariables();
    5454            void LODchanged();
    5555            void checkStop();
  • code/branches/presentation3/src/orxonox/worldentities/MobileEntity.cc

    r5781 r7153  
    4646        this->angularAcceleration_ = Vector3::ZERO;
    4747        this->angularVelocity_     = Vector3::ZERO;
    48 
    49         this->registerVariables();
    5048    }
    5149
  • code/branches/presentation3/src/orxonox/worldentities/MovableEntity.h

    r6417 r7153  
    4848            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4949            virtual bool collidesAgainst(WorldEntity* otherObject, btManifoldPoint& contactPoint);
    50             void registerVariables();
    5150
    5251            using WorldEntity::setPosition;
     
    7978
    8079        private:
     80            void registerVariables();
    8181            void clientConnected(unsigned int clientID);
    8282            void clientDisconnected(unsigned int clientID);
  • code/branches/presentation3/src/orxonox/worldentities/StaticEntity.h

    r5781 r7153  
    4242            virtual ~StaticEntity();
    4343
    44             void registerVariables();
    45 
    4644            using WorldEntity::setPosition;
    4745            using WorldEntity::setOrientation;
     
    5149
    5250        private:
     51            void registerVariables();
    5352            bool isCollisionTypeLegal(CollisionType type) const;
    5453
  • code/branches/presentation3/src/orxonox/worldentities/WorldEntity.h

    r7127 r7153  
    9494
    9595            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    96             void registerVariables();
    9796
    9897            inline const Ogre::SceneNode* getNode() const
     
    214213
    215214        private:
     215            void registerVariables();
     216           
    216217            inline void lookAt_xmlport(const Vector3& target)
    217218                { this->lookAt(target); }
  • code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.cc

    r7075 r7153  
    130130        registerVariable(this->shieldAbsorption_, VariableDirection::ToClient);
    131131        registerVariable(this->bReload_,          VariableDirection::ToServer);
    132         registerVariable(this->aimPosition_,      Bidirectionality::ServerMaster, 0, true);
     132        registerVariable(this->aimPosition_,      VariableDirection::ToServer);  // For the moment this variable gets only transfered to the server
    133133    }
    134134
  • code/branches/presentation3/src/orxonox/worldentities/pawns/Pawn.h

    r7075 r7153  
    5050            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    5151            virtual void tick(float dt);
    52             void registerVariables();
    5352
    5453            inline bool isAlive() const
     
    166165
    167166        private:
     167            void registerVariables();
    168168            inline void setWeaponSystem(WeaponSystem* weaponsystem)
    169169                { this->weaponSystem_ = weaponsystem; }
  • code/branches/presentation3/src/orxonox/worldentities/pawns/SpaceShip.h

    r6711 r7153  
    4747            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
    4848            virtual void tick(float dt);
    49             void registerVariables();
    5049            void setConfigValues();
    5150
     
    9998
    10099        private:
     100            void registerVariables();
    101101            virtual bool isCollisionTypeLegal(WorldEntity::CollisionType type) const;
    102102
    103         private:
    104103            void loadEngineTemplate();
    105104
  • code/branches/presentation3/src/orxonox/worldentities/pawns/Spectator.h

    r6417 r7153  
    4444
    4545            void setConfigValues();
    46             void registerVariables();
    4746            virtual void tick(float dt);
    4847
     
    6362
    6463        private:
     64            void registerVariables();
    6565            void changedGreeting();
    6666            void changedFlareVisibility();
Note: See TracChangeset for help on using the changeset viewer.