Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 23, 2008, 11:09:55 PM (16 years ago)
Author:
rgrieder
Message:

Merged revision 2371 to bugger branch.

Location:
code/branches/bugger
Files:
73 edited

Legend:

Unmodified
Added
Removed
  • code/branches/bugger

  • code/branches/bugger/src/orxonox/objects/GlobalShader.cc

    r2414 r2531  
    6666    void GlobalShader::registerVariables()
    6767    {
    68         REGISTERDATA  (this->bVisible_, direction::toclient, new NetworkCallback<GlobalShader>(this, &GlobalShader::changedVisibility));
    69         REGISTERSTRING(const_cast<std::string&>(this->shader_.getCompositor()), direction::toclient, new NetworkCallback<Shader>(&this->shader_, &Shader::changedCompositor));
     68        registerVariable(this->bVisible_, variableDirection::toclient, new NetworkCallback<GlobalShader>(this, &GlobalShader::changedVisibility));
     69        registerVariable(const_cast<std::string&>(this->shader_.getCompositor()), variableDirection::toclient, new NetworkCallback<Shader>(&this->shader_, &Shader::changedCompositor));
    7070    }
    7171
  • code/branches/bugger/src/orxonox/objects/GlobalShader.h

    r2350 r2531  
    3333
    3434#include "core/BaseObject.h"
    35 #include "network/Synchronisable.h"
     35#include "network/synchronisable/Synchronisable.h"
    3636#include "tools/Shader.h"
    3737
  • code/branches/bugger/src/orxonox/objects/Level.cc

    r2530 r2531  
    8383    void Level::registerVariables()
    8484    {
    85         REGISTERSTRING(this->xmlfilename_, direction::toclient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
    86         REGISTERSTRING(this->name_,        direction::toclient, new NetworkCallback<Level>(this, &Level::changedName));
    87         REGISTERSTRING(this->description_, direction::toclient);
     85        registerVariable(this->xmlfilename_, variableDirection::toclient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));
     86        registerVariable(this->name_,        variableDirection::toclient, new NetworkCallback<Level>(this, &Level::changedName));
     87        registerVariable(this->description_, variableDirection::toclient);
    8888    }
    8989
  • code/branches/bugger/src/orxonox/objects/Level.h

    r2530 r2531  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include "network/Synchronisable.h"
     34#include "network/synchronisable/Synchronisable.h"
    3535#include "core/BaseObject.h"
    3636
  • code/branches/bugger/src/orxonox/objects/Scene.cc

    r2447 r2531  
    101101    void Scene::registerVariables()
    102102    {
    103         REGISTERSTRING(this->skybox_,     direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
    104         REGISTERDATA(this->ambientLight_, direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
    105         REGISTERDATA(this->bShadows_,     direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
     103        registerVariable(this->skybox_,     variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));
     104        registerVariable(this->ambientLight_, variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));
     105        registerVariable(this->bShadows_,     variableDirection::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyShadows));
    106106    }
    107107
  • code/branches/bugger/src/orxonox/objects/Scene.h

    r2447 r2531  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include "network/Synchronisable.h"
     34#include "network/synchronisable/Synchronisable.h"
    3535#include "core/BaseObject.h"
    3636#include "util/Math.h"
  • code/branches/bugger/src/orxonox/objects/Test.cc

    r2171 r2531  
    6161        void Test::setConfigValues()
    6262        {
    63                 SetConfigValue ( v1, 1 )/*.callback ( this, &Test::checkV1 )*/;
    64     SetConfigValue ( v2, 2 )/*.callback ( this, &Test::checkV2 )*/;
    65     SetConfigValue ( v3, 3 )/*.callback ( this, &Test::checkV3 )*/;
    66     SetConfigValue ( v4, 4 )/*.callback ( this, &Test::checkV4 )*/;
     63                SetConfigValue ( u1, 1 )/*.callback ( this, &Test::checkV1 )*/;
     64    SetConfigValue ( u2, 2 )/*.callback ( this, &Test::checkV2 )*/;
     65    SetConfigValue ( u3, 3 )/*.callback ( this, &Test::checkV3 )*/;
     66    SetConfigValue ( u4, 4 )/*.callback ( this, &Test::checkV4 )*/;
     67   
     68    SetConfigValue ( s1, 1 )/*.callback ( this, &Test::checkV1 )*/;
     69    SetConfigValue ( s2, 2 )/*.callback ( this, &Test::checkV2 )*/;
     70    SetConfigValue ( s3, 3 )/*.callback ( this, &Test::checkV3 )*/;
     71    SetConfigValue ( s4, 4 )/*.callback ( this, &Test::checkV4 )*/;
    6772        }
    6873
     
    7075        void Test::registerVariables()
    7176        {
    72                 REGISTERDATA ( v1,direction::toclient, new NetworkCallback<Test> ( this, &Test::checkV1 ) );
    73     REGISTERDATA ( v2,direction::toserver, new NetworkCallback<Test> ( this, &Test::checkV2 ) );
    74                 REGISTERDATA ( v3,direction::serverMaster, new NetworkCallback<Test> ( this, &Test::checkV3 ) );
    75     REGISTERDATA ( v4,direction::clientMaster, new NetworkCallback<Test> ( this, &Test::checkV4 ) );
     77                registerVariable ( u1, variableDirection::toclient, new NetworkCallback<Test> ( this, &Test::checkU1 ));
     78    registerVariable ( u2, variableDirection::toserver, new NetworkCallback<Test> ( this, &Test::checkU2 ));
     79                registerVariable ( u3, variableDirection::serverMaster, new NetworkCallback<Test> ( this, &Test::checkU3 ), true );
     80    registerVariable ( u4, variableDirection::clientMaster, new NetworkCallback<Test> ( this, &Test::checkU4 ), true );
     81   
     82    registerVariable ( s1, variableDirection::toclient, new NetworkCallback<Test> ( this, &Test::checkS1 ));
     83    registerVariable ( s2, variableDirection::toserver, new NetworkCallback<Test> ( this, &Test::checkS2 ));
     84    registerVariable ( s3, variableDirection::serverMaster, new NetworkCallback<Test> ( this, &Test::checkS3 ), true );
     85    registerVariable ( s4, variableDirection::clientMaster, new NetworkCallback<Test> ( this, &Test::checkS4 ), true );
    7686        }
    7787
    78   void Test::checkV1(){
    79     COUT(1) << "V1 changed: " << v1 << std::endl;
    80   }
     88  void Test::checkU1(){ COUT(1) << "U1 changed: " << u1 << std::endl; }
     89  void Test::checkU2(){ COUT(1) << "U2 changed: " << u2 << std::endl; }
     90  void Test::checkU3(){ COUT(1) << "U3 changed: " << u3 << std::endl; }
     91  void Test::checkU4(){ COUT(1) << "U4 changed: " << u4 << std::endl; }
    8192
    82   void Test::checkV2(){
    83     COUT(1) << "V2 changed: " << v2 << std::endl;
    84   }
    85 
    86   void Test::checkV3(){
    87     COUT(1) << "V3 changed: " << v3 << std::endl;
    88   }
    89  
    90   void Test::checkV4(){
    91     COUT(1) << "V4 changed: " << v4 << std::endl;
    92   }
    93 
     93  void Test::checkS1(){ COUT(1) << "S1 changed: " << s1 << std::endl; }
     94  void Test::checkS2(){ COUT(1) << "S2 changed: " << s2 << std::endl; }
     95  void Test::checkS3(){ COUT(1) << "S3 changed: " << s3 << std::endl; }
     96  void Test::checkS4(){ COUT(1) << "S4 changed: " << s4 << std::endl; }
    9497
    9598}
  • code/branches/bugger/src/orxonox/objects/Test.h

    r2171 r2531  
    3232#include "OrxonoxPrereqs.h"
    3333#include "core/BaseObject.h"
    34 #include "network/Synchronisable.h"
     34#include "network/synchronisable/Synchronisable.h"
     35
     36
     37typedef int TYPE;
     38typedef unsigned int UTYPE;
     39
    3540
    3641namespace orxonox
     
    4550      void registerVariables();
    4651
    47       void setV1(unsigned int value){ v1 = value; }
    48       void setV2(unsigned int value){ v2 = value; }
    49       void setV3(unsigned int value){ v3 = value; }
    50       void setV4(unsigned int value){ v4 = value; }
    5152
    52       void checkV1();
    53       void checkV2();
    54       void checkV3();
    55       void checkV4();
     53      //unsigned functions
     54      void setU1(UTYPE value){ u1 = value; }
     55      void setU2(UTYPE value){ u2 = value; }
     56      void setU3(UTYPE value){ u3 = value; }
     57      void setU4(UTYPE value){ u4 = value; }
     58      void checkU1();
     59      void checkU2();
     60      void checkU3();
     61      void checkU4();
    5662     
    57       void printV1(){ instance_->checkV1(); }
    58       void printV2(){ instance_->checkV2(); }
    59       void printV3(){ instance_->checkV3(); }
    60       void printV4(){ instance_->checkV4(); }
     63      //signed functions
     64      void setS1(TYPE value){ s1 = value; }
     65      void setS2(TYPE value){ s2 = value; }
     66      void setS3(TYPE value){ s3 = value; }
     67      void setS4(TYPE value){ s4 = value; }
     68      void checkS1();
     69      void checkS2();
     70      void checkS3();
     71      void checkS4();
     72     
     73      static void printV1(){ instance_->checkU1(); }
     74      static void printV2(){ instance_->checkU2(); }
     75      static void printV3(){ instance_->checkU3(); }
     76      static void printV4(){ instance_->checkU4(); }
    6177
    6278    private:
    63       unsigned int v1;
    64       unsigned int v2;
    65       unsigned int v3;
    66       unsigned int v4;
     79      UTYPE u1;
     80      UTYPE u2;
     81      UTYPE u3;
     82      UTYPE u4;
     83     
     84      TYPE s1;
     85      TYPE s2;
     86      TYPE s3;
     87      TYPE s4;
    6788     
    6889      static Test* instance_;
  • code/branches/bugger/src/orxonox/objects/infos/GametypeInfo.cc

    r2428 r2531  
    5454    void GametypeInfo::registerVariables()
    5555    {
    56         REGISTERDATA(this->bStarted_,               direction::toclient);
    57         REGISTERDATA(this->bEnded_,                 direction::toclient);
    58         REGISTERDATA(this->startCountdown_,         direction::toclient);
    59         REGISTERDATA(this->bStartCountdownRunning_, direction::toclient);
     56        registerVariable(this->bStarted_,               variableDirection::toclient);
     57        registerVariable(this->bEnded_,                 variableDirection::toclient);
     58        registerVariable(this->startCountdown_,         variableDirection::toclient);
     59        registerVariable(this->bStartCountdownRunning_, variableDirection::toclient);
    6060    }
    6161}
  • code/branches/bugger/src/orxonox/objects/infos/HumanPlayer.cc

    r2428 r2531  
    6969    void HumanPlayer::registerVariables()
    7070    {
    71         REGISTERSTRING(this->synchronize_nick_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
     71        registerVariable(this->synchronize_nick_, variableDirection::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));
    7272
    73         REGISTERDATA(this->clientID_,           direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
    74         REGISTERDATA(this->server_initialized_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized));
    75         REGISTERDATA(this->client_initialized_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized));
     73        registerVariable(this->clientID_,           variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));
     74        registerVariable(this->server_initialized_, variableDirection::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_initialized));
     75        registerVariable(this->client_initialized_, variableDirection::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_initialized));
    7676    }
    7777
     
    106106
    107107            if (!Core::isMaster())
    108                 this->setObjectMode(direction::bidirectional);
     108                this->setObjectMode(objectDirection::bidirectional);
    109109            else
    110110                this->setName(this->nick_);
  • code/branches/bugger/src/orxonox/objects/infos/Info.h

    r2171 r2531  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include "network/Synchronisable.h"
     34#include "network/synchronisable/Synchronisable.h"
    3535#include "core/BaseObject.h"
    3636
  • code/branches/bugger/src/orxonox/objects/infos/PlayerInfo.cc

    r2462 r2531  
    7373    void PlayerInfo::registerVariables()
    7474    {
    75         REGISTERSTRING(this->name_,                 direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
    76         REGISTERDATA  (this->controllableEntityID_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
    77         REGISTERDATA  (this->bReadyToSpawn_,        direction::toserver);
     75        registerVariable(this->name_,                 variableDirection::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));
     76        registerVariable(this->controllableEntityID_, variableDirection::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));
     77        registerVariable(this->bReadyToSpawn_,        variableDirection::toserver);
    7878    }
    7979
  • code/branches/bugger/src/orxonox/objects/items/Engine.cc

    r2478 r2531  
    104104    void Engine::registerVariables()
    105105    {
    106         REGISTERDATA(this->shipID_, direction::toclient, new NetworkCallback<Engine>(this, &Engine::networkcallback_shipID));
    107 
    108         REGISTERDATA(this->speedFactor_, direction::toclient);
    109         REGISTERDATA(this->boostFactor_, direction::toclient);
    110 
    111         REGISTERDATA(this->maxSpeedFront_,     direction::toclient);
    112         REGISTERDATA(this->maxSpeedBack_,      direction::toclient);
    113         REGISTERDATA(this->maxSpeedLeftRight_, direction::toclient);
    114         REGISTERDATA(this->maxSpeedUpDown_,    direction::toclient);
    115 
    116         REGISTERDATA(this->accelerationFront_,     direction::toclient);
    117         REGISTERDATA(this->accelerationBrake_,     direction::toclient);
    118         REGISTERDATA(this->accelerationBack_,      direction::toclient);
    119         REGISTERDATA(this->accelerationLeftRight_, direction::toclient);
    120         REGISTERDATA(this->accelerationUpDown_,    direction::toclient);
     106        registerVariable(this->shipID_, variableDirection::toclient, new NetworkCallback<Engine>(this, &Engine::networkcallback_shipID));
     107
     108        registerVariable(this->speedFactor_, variableDirection::toclient);
     109        registerVariable(this->boostFactor_, variableDirection::toclient);
     110
     111        registerVariable(this->maxSpeedFront_,     variableDirection::toclient);
     112        registerVariable(this->maxSpeedBack_,      variableDirection::toclient);
     113        registerVariable(this->maxSpeedLeftRight_, variableDirection::toclient);
     114        registerVariable(this->maxSpeedUpDown_,    variableDirection::toclient);
     115
     116        registerVariable(this->accelerationFront_,     variableDirection::toclient);
     117        registerVariable(this->accelerationBrake_,     variableDirection::toclient);
     118        registerVariable(this->accelerationBack_,      variableDirection::toclient);
     119        registerVariable(this->accelerationLeftRight_, variableDirection::toclient);
     120        registerVariable(this->accelerationUpDown_,    variableDirection::toclient);
    121121    }
    122122
  • code/branches/bugger/src/orxonox/objects/items/Item.h

    r2254 r2531  
    3333
    3434#include "core/BaseObject.h"
    35 #include "network/Synchronisable.h"
     35#include "network/synchronisable/Synchronisable.h"
    3636
    3737namespace orxonox
  • code/branches/bugger/src/orxonox/objects/items/MultiStateEngine.cc

    r2254 r2531  
    8383    void MultiStateEngine::registerVariables()
    8484    {
    85         REGISTERDATA(this->state_, direction::toserver);
     85        registerVariable(this->state_, variableDirection::toserver);
    8686    }
    8787
     
    9292            if (this->getShip()->hasLocalController())
    9393            {
    94                 this->setObjectMode(direction::bidirectional);
     94                this->setObjectMode(objectDirection::bidirectional);
    9595
    9696                const Vector3& direction = this->getDirection();
  • code/branches/bugger/src/orxonox/objects/pickup/Usable.h

  • code/branches/bugger/src/orxonox/objects/quest/AddQuest.cc

  • code/branches/bugger/src/orxonox/objects/quest/AddQuest.h

  • code/branches/bugger/src/orxonox/objects/quest/AddQuestHint.cc

  • code/branches/bugger/src/orxonox/objects/quest/AddQuestHint.h

  • code/branches/bugger/src/orxonox/objects/quest/AddReward.cc

  • code/branches/bugger/src/orxonox/objects/quest/AddReward.h

  • code/branches/bugger/src/orxonox/objects/quest/ChangeQuestStatus.cc

  • code/branches/bugger/src/orxonox/objects/quest/ChangeQuestStatus.h

  • code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.cc

  • code/branches/bugger/src/orxonox/objects/quest/CompleteQuest.h

  • code/branches/bugger/src/orxonox/objects/quest/FailQuest.cc

  • code/branches/bugger/src/orxonox/objects/quest/FailQuest.h

  • code/branches/bugger/src/orxonox/objects/quest/GlobalQuest.cc

  • code/branches/bugger/src/orxonox/objects/quest/GlobalQuest.h

  • code/branches/bugger/src/orxonox/objects/quest/LocalQuest.cc

  • code/branches/bugger/src/orxonox/objects/quest/LocalQuest.h

  • code/branches/bugger/src/orxonox/objects/quest/Quest.cc

  • code/branches/bugger/src/orxonox/objects/quest/Quest.h

  • code/branches/bugger/src/orxonox/objects/quest/QuestDescription.cc

  • code/branches/bugger/src/orxonox/objects/quest/QuestDescription.h

  • code/branches/bugger/src/orxonox/objects/quest/QuestEffect.cc

  • code/branches/bugger/src/orxonox/objects/quest/QuestEffect.h

  • code/branches/bugger/src/orxonox/objects/quest/QuestHint.cc

  • code/branches/bugger/src/orxonox/objects/quest/QuestHint.h

  • code/branches/bugger/src/orxonox/objects/quest/QuestItem.cc

  • code/branches/bugger/src/orxonox/objects/quest/QuestItem.h

  • code/branches/bugger/src/orxonox/objects/quest/QuestManager.cc

  • code/branches/bugger/src/orxonox/objects/quest/QuestManager.h

  • code/branches/bugger/src/orxonox/objects/quest/Rewardable.cc

  • code/branches/bugger/src/orxonox/objects/quest/Rewardable.h

  • code/branches/bugger/src/orxonox/objects/weaponSystem/WeaponSystem.cc

  • code/branches/bugger/src/orxonox/objects/weaponSystem/WeaponSystem.h

  • code/branches/bugger/src/orxonox/objects/worldentities/Backlight.cc

    r2530 r2531  
    109109    void Backlight::registerVariables()
    110110    {
    111         REGISTERDATA  (this->width_,         direction::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_width));
    112         REGISTERDATA  (this->lifetime_,      direction::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_lifetime));
    113         REGISTERDATA  (this->length_,        direction::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_length));
    114         REGISTERDATA  (this->maxelements_,   direction::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_maxelements));
    115         REGISTERSTRING(this->trailmaterial_, direction::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_trailmaterial));
     111        registerVariable  (this->width_,         variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_width));
     112        registerVariable  (this->lifetime_,      variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_lifetime));
     113        registerVariable  (this->length_,        variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_length));
     114        registerVariable  (this->maxelements_,   variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_maxelements));
     115        registerVariable  (this->trailmaterial_, variableDirection::toclient, new NetworkCallback<Backlight>(this, &Backlight::update_trailmaterial));
    116116    }
    117117
  • code/branches/bugger/src/orxonox/objects/worldentities/Backlight.h

  • code/branches/bugger/src/orxonox/objects/worldentities/Billboard.cc

    r2254 r2531  
    6767    void Billboard::registerVariables()
    6868    {
    69         REGISTERSTRING(this->material_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
    70         REGISTERDATA  (this->colour_,   direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
     69        registerVariable(this->material_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));
     70        registerVariable(this->colour_,   variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));
    7171    }
    7272
  • code/branches/bugger/src/orxonox/objects/worldentities/Camera.cc

  • code/branches/bugger/src/orxonox/objects/worldentities/Camera.h

  • code/branches/bugger/src/orxonox/objects/worldentities/ControllableEntity.cc

    r2478 r2531  
    238238            {
    239239                this->client_overwrite_ = this->server_overwrite_;
    240                 this->setObjectMode(direction::bidirectional);
     240                this->setObjectMode(objectDirection::bidirectional);
    241241            }
    242242        }
     
    252252        this->bHasLocalController_ = false;
    253253        this->bHasHumanController_ = false;
    254         this->setObjectMode(direction::toclient);
     254        this->setObjectMode(objectDirection::toclient);
    255255
    256256        if (this->bDestroyWhenPlayerLeft_)
     
    345345    void ControllableEntity::registerVariables()
    346346    {
    347         REGISTERSTRING(this->cameraPositionTemplate_, direction::toclient);
    348         REGISTERSTRING(this->hudtemplate_, direction::toclient);
    349 
    350         REGISTERDATA(this->client_overwrite_,   direction::toserver);
    351 
    352         REGISTERDATA(this->server_position_,    direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
    353         REGISTERDATA(this->server_velocity_,    direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));
    354         REGISTERDATA(this->server_orientation_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
    355         REGISTERDATA(this->server_overwrite_,   direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
    356 
    357         REGISTERDATA(this->client_position_,    direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
    358         REGISTERDATA(this->client_velocity_,    direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));
    359         REGISTERDATA(this->client_orientation_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
    360 
    361 
    362         REGISTERDATA(this->playerID_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
    363         REGISTERDATA(this->gtinfoID_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedgtinfoID));
     347        registerVariable(this->cameraPositionTemplate_, variableDirection::toclient);
     348        registerVariable(this->hudtemplate_, variableDirection::toclient);
     349
     350        registerVariable(this->client_overwrite_,   variableDirection::toserver);
     351         
     352        registerVariable(this->server_position_,    variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));
     353        registerVariable(this->server_velocity_,    variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));
     354        registerVariable(this->server_orientation_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));
     355        registerVariable(this->server_overwrite_,   variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));
     356 
     357        registerVariable(this->client_position_,    variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));
     358        registerVariable(this->client_velocity_,    variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));
     359        registerVariable(this->client_orientation_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));
     360 
     361 
     362        registerVariable(this->playerID_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));
     363        registerVariable(this->gtinfoID_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedgtinfoID));
    364364    }
    365365
  • code/branches/bugger/src/orxonox/objects/worldentities/ExplosionChunk.cc

    r2422 r2531  
    9191    void ExplosionChunk::registerVariables()
    9292    {
    93         REGISTERDATA(this->LOD_,   direction::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::LODchanged));
    94         REGISTERDATA(this->bStop_, direction::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::checkStop));
     93        registerVariable((int&)this->LOD_,   variableDirection::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::LODchanged));
     94        registerVariable(this->bStop_, variableDirection::toclient, new NetworkCallback<ExplosionChunk>(this, &ExplosionChunk::checkStop));
    9595    }
    9696
  • code/branches/bugger/src/orxonox/objects/worldentities/FadingBillboard.cc

    r2361 r2531  
    6666    void FadingBillboard::registerVariables()
    6767    {
    68         REGISTERDATA(this->turnontime_,         direction::toclient);
    69         REGISTERDATA(this->turnofftime_,        direction::toclient);
     68        registerVariable(this->turnontime_,         variableDirection::toclient);
     69        registerVariable(this->turnofftime_,        variableDirection::toclient);
    7070    }
    7171
  • code/branches/bugger/src/orxonox/objects/worldentities/Light.cc

    r2447 r2531  
    103103    void Light::registerVariables()
    104104    {
    105         REGISTERDATA(this->type_,           direction::toclient, new NetworkCallback<Light>(this, &Light::updateType));
    106         REGISTERDATA(this->diffuse_,        direction::toclient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
    107         REGISTERDATA(this->specular_,       direction::toclient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
    108         REGISTERDATA(this->attenuation_,    direction::toclient, new NetworkCallback<Light>(this, &Light::updateAttenuation));
    109         REGISTERDATA(this->spotlightRange_, direction::toclient, new NetworkCallback<Light>(this, &Light::updateSpotlightRange));
     105        registerVariable((int &)this->type_,    variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateType));
     106        registerVariable(this->diffuse_,        variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateDiffuseColour));
     107        registerVariable(this->specular_,       variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateSpecularColour));
     108        registerVariable(this->attenuation_,    variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateAttenuation));
     109        registerVariable(this->spotlightRange_, variableDirection::toclient, new NetworkCallback<Light>(this, &Light::updateSpotlightRange));
    110110    }
    111111
  • code/branches/bugger/src/orxonox/objects/worldentities/Model.cc

    r2447 r2531  
    4040    Model::Model(BaseObject* creator) : PositionableEntity(creator)
    4141    {
     42        static unsigned int i=10;
    4243        RegisterObject(Model);
    4344
     
    4546
    4647        this->registerVariables();
     48        this->setObjectPriority(i++);
    4749    }
    4850
     
    6365    void Model::registerVariables()
    6466    {
    65         REGISTERSTRING(this->meshSrc_,    direction::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));
    66         REGISTERDATA(this->bCastShadows_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));
     67        registerVariable(this->meshSrc_,    variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));
     68        registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));
    6769    }
    6870
  • code/branches/bugger/src/orxonox/objects/worldentities/MovableEntity.cc

    r2422 r2531  
    8585    void MovableEntity::registerVariables()
    8686    {
    87         REGISTERDATA(this->velocity_.x, direction::toclient);
    88         REGISTERDATA(this->velocity_.y, direction::toclient);
    89         REGISTERDATA(this->velocity_.z, direction::toclient);
    90 
    91         REGISTERDATA(this->rotationAxis_.x, direction::toclient);
    92         REGISTERDATA(this->rotationAxis_.y, direction::toclient);
    93         REGISTERDATA(this->rotationAxis_.z, direction::toclient);
    94 
    95         REGISTERDATA(this->rotationRate_, direction::toclient);
    96 
    97         REGISTERDATA(this->overwrite_position_,    direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
    98         REGISTERDATA(this->overwrite_orientation_, direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
     87        registerVariable(this->velocity_.x, variableDirection::toclient);
     88        registerVariable(this->velocity_.y, variableDirection::toclient);
     89        registerVariable(this->velocity_.z, variableDirection::toclient);
     90 
     91        registerVariable(this->rotationAxis_.x, variableDirection::toclient);
     92        registerVariable(this->rotationAxis_.y, variableDirection::toclient);
     93        registerVariable(this->rotationAxis_.z, variableDirection::toclient);
     94 
     95        registerVariable(this->rotationRate_, variableDirection::toclient);
     96 
     97        registerVariable(this->overwrite_position_,    variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));
     98        registerVariable(this->overwrite_orientation_, variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));
    9999    }
    100100
  • code/branches/bugger/src/orxonox/objects/worldentities/ParticleEmitter.cc

    r2414 r2531  
    7575    void ParticleEmitter::registerVariables()
    7676    {
    77         REGISTERSTRING(this->source_, direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
    78         REGISTERDATA  (this->LOD_,    direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
     77        registerVariable(this->source_, variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));
     78        registerVariable((int&)(this->LOD_),    variableDirection::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));
    7979    }
    8080
  • code/branches/bugger/src/orxonox/objects/worldentities/ParticleSpawner.cc

  • code/branches/bugger/src/orxonox/objects/worldentities/ParticleSpawner.h

  • code/branches/bugger/src/orxonox/objects/worldentities/PositionableEntity.cc

    r2171 r2531  
    4848    void PositionableEntity::registerVariables()
    4949    {
    50         REGISTERDATA(this->getPosition().x, direction::toclient);
    51         REGISTERDATA(this->getPosition().y, direction::toclient);
    52         REGISTERDATA(this->getPosition().z, direction::toclient);
     50        registerVariable(this->getPosition().x, variableDirection::toclient);
     51        registerVariable(this->getPosition().y, variableDirection::toclient);
     52        registerVariable(this->getPosition().z, variableDirection::toclient);
    5353
    54         REGISTERDATA(this->getOrientation().w, direction::toclient);
    55         REGISTERDATA(this->getOrientation().x, direction::toclient);
    56         REGISTERDATA(this->getOrientation().y, direction::toclient);
    57         REGISTERDATA(this->getOrientation().z, direction::toclient);
     54        registerVariable(this->getOrientation().w, variableDirection::toclient);
     55        registerVariable(this->getOrientation().x, variableDirection::toclient);
     56        registerVariable(this->getOrientation().y, variableDirection::toclient);
     57        registerVariable(this->getOrientation().z, variableDirection::toclient);
    5858    }
    5959}
  • code/branches/bugger/src/orxonox/objects/worldentities/WorldEntity.cc

    r2478 r2531  
    105105    void WorldEntity::registerVariables()
    106106    {
    107         REGISTERSTRING(this->mainStateName_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedMainState));
     107        registerVariable(this->mainStateName_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedMainState));
    108108
    109         REGISTERDATA(this->bActive_,  direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
    110         REGISTERDATA(this->bVisible_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
    111 
    112         REGISTERDATA(this->getScale3D().x, direction::toclient);
    113         REGISTERDATA(this->getScale3D().y, direction::toclient);
    114         REGISTERDATA(this->getScale3D().z, direction::toclient);
    115 
    116         REGISTERDATA(this->parentID_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));
     109        registerVariable(this->bActive_,  variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));
     110        registerVariable(this->bVisible_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));
     111 
     112        registerVariable(this->getScale3D().x, variableDirection::toclient);
     113        registerVariable(this->getScale3D().y, variableDirection::toclient);
     114        registerVariable(this->getScale3D().z, variableDirection::toclient);
     115 
     116        registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));
    117117    }
    118118
  • code/branches/bugger/src/orxonox/objects/worldentities/WorldEntity.h

    r2478 r2531  
    3636#include <OgreSceneNode.h>
    3737
    38 #include "network/Synchronisable.h"
     38#include "network/synchronisable/Synchronisable.h"
    3939#include "core/BaseObject.h"
    4040#include "util/Math.h"
  • code/branches/bugger/src/orxonox/objects/worldentities/pawns/Pawn.cc

    r2530 r2531  
    9999    void Pawn::registerVariables()
    100100    {
    101         REGISTERDATA(this->bAlive_, direction::toclient);
    102         REGISTERDATA(this->health_, direction::toclient);
    103         REGISTERDATA(this->initialHealth_, direction::toclient);
     101        registerVariable(this->bAlive_, variableDirection::toclient);
     102        registerVariable(this->health_, variableDirection::toclient);
     103        registerVariable(this->initialHealth_, variableDirection::toclient);
    104104    }
    105105
  • code/branches/bugger/src/orxonox/objects/worldentities/pawns/SpaceShip.cc

    r2478 r2531  
    8585    void SpaceShip::registerVariables()
    8686    {
    87         REGISTERDATA(this->maxRotation_,             direction::toclient);
    88         REGISTERDATA(this->rotationAcceleration_,    direction::toclient);
    89         REGISTERDATA(this->translationDamping_,      direction::toclient);
     87        registerVariable(this->maxRotation_,             variableDirection::toclient);
     88        registerVariable(this->rotationAcceleration_,    variableDirection::toclient);
     89        registerVariable(this->translationDamping_,      variableDirection::toclient);
    9090    }
    9191
  • code/branches/bugger/src/orxonox/objects/worldentities/pawns/Spectator.cc

    r2478 r2531  
    9191    void Spectator::registerVariables()
    9292    {
    93         REGISTERDATA(this->bGreetingFlareVisible_, direction::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
    94         REGISTERDATA(this->bGreeting_,             direction::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
     93        registerVariable(this->bGreetingFlareVisible_, variableDirection::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));
     94        registerVariable(this->bGreeting_,             variableDirection::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));
    9595    }
    9696
  • code/branches/bugger/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc

  • code/branches/bugger/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h

  • code/branches/bugger/src/orxonox/objects/worldentities/triggers/Trigger.cc

  • code/branches/bugger/src/orxonox/objects/worldentities/triggers/Trigger.h

Note: See TracChangeset for help on using the changeset viewer.