Changeset 2112 for code/branches/objecthierarchy/src/orxonox
- Timestamp:
- Nov 2, 2008, 12:54:17 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox
- Files:
-
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/LevelManager.h
r2072 r2112 40 40 namespace orxonox 41 41 { 42 class _OrxonoxExport LevelManager : public network::ClientConnectionListener42 class _OrxonoxExport LevelManager : public ClientConnectionListener 43 43 { 44 44 public: -
code/branches/objecthierarchy/src/orxonox/gamestates/GSClient.cc
r2023 r2112 53 53 Core::setIsClient(true); 54 54 55 this->client_ = new network::Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port"));55 this->client_ = new Client(CommandLine::getValue("ip").getString(), CommandLine::getValue("port")); 56 56 57 57 if(!client_->establishConnection()) -
code/branches/objecthierarchy/src/orxonox/gamestates/GSClient.h
r2023 r2112 49 49 void ticked(const Clock& time); 50 50 51 network::Client* client_;51 Client* client_; 52 52 }; 53 53 } -
code/branches/objecthierarchy/src/orxonox/gamestates/GSDedicated.cc
r2023 r2112 50 50 Core::setHasServer(true); 51 51 52 this->server_ = new network::Server(CommandLine::getValue("port"));52 this->server_ = new Server(CommandLine::getValue("port")); 53 53 COUT(0) << "Loading scene in server mode" << std::endl; 54 54 -
code/branches/objecthierarchy/src/orxonox/gamestates/GSDedicated.h
r2023 r2112 48 48 void ticked(const Clock& time); 49 49 50 network::Server* server_;50 Server* server_; 51 51 }; 52 52 } -
code/branches/objecthierarchy/src/orxonox/gamestates/GSServer.cc
r2023 r2112 52 52 Core::setHasServer(true); 53 53 54 this->server_ = new network::Server(CommandLine::getValue("port"));54 this->server_ = new Server(CommandLine::getValue("port")); 55 55 COUT(0) << "Loading scene in server mode" << std::endl; 56 56 -
code/branches/objecthierarchy/src/orxonox/gamestates/GSServer.h
r2023 r2112 48 48 void ticked(const Clock& time); 49 49 50 network::Server* server_;50 Server* server_; 51 51 }; 52 52 } -
code/branches/objecthierarchy/src/orxonox/objects/Scene.cc
r2072 r2112 43 43 CreateFactory(Scene); 44 44 45 Scene::Scene(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)45 Scene::Scene(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 46 46 { 47 47 RegisterObject(Scene); … … 114 114 void Scene::registerVariables() 115 115 { 116 REGISTERSTRING(this->skybox_, network::direction::toclient, new network::NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox));117 REGISTERDATA(this->ambientLight_, network::direction::toclient, new network::NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight));116 REGISTERSTRING(this->skybox_, direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applySkybox)); 117 REGISTERDATA(this->ambientLight_, direction::toclient, new NetworkCallback<Scene>(this, &Scene::networkcallback_applyAmbientLight)); 118 118 } 119 119 -
code/branches/objecthierarchy/src/orxonox/objects/Scene.h
r2072 r2112 38 38 namespace orxonox 39 39 { 40 class _OrxonoxExport Scene : public BaseObject, public network::Synchronisable40 class _OrxonoxExport Scene : public BaseObject, public Synchronisable 41 41 { 42 42 public: -
code/branches/objecthierarchy/src/orxonox/objects/Test.cc
r2034 r2112 36 36 CreateFactory ( Test ); 37 37 38 Test::Test(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)38 Test::Test(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 39 39 { 40 40 RegisterObject ( Test ); … … 59 59 void Test::registerVariables() 60 60 { 61 REGISTERDATA ( v1, network::direction::toclient, new network::NetworkCallback<Test> ( this, &Test::checkV1 ) );62 REGISTERDATA ( v2, network::direction::toserver, new network::NetworkCallback<Test> ( this, &Test::checkV2 ) );63 REGISTERDATA ( v3, network::direction::bidirectional, new network::NetworkCallback<Test> ( this, &Test::checkV3 ) );61 REGISTERDATA ( v1,direction::toclient, new NetworkCallback<Test> ( this, &Test::checkV1 ) ); 62 REGISTERDATA ( v2,direction::toserver, new NetworkCallback<Test> ( this, &Test::checkV2 ) ); 63 REGISTERDATA ( v3,direction::bidirectional, new NetworkCallback<Test> ( this, &Test::checkV3 ) ); 64 64 } 65 65 -
code/branches/objecthierarchy/src/orxonox/objects/Test.h
r2019 r2112 36 36 namespace orxonox 37 37 { 38 class _OrxonoxExport Test: public BaseObject, public network::Synchronisable38 class _OrxonoxExport Test: public BaseObject, public Synchronisable 39 39 { 40 40 public: -
code/branches/objecthierarchy/src/orxonox/objects/gametypes/Gametype.cc
r2086 r2112 92 92 std::string message = player->getName() + " entered the game"; 93 93 COUT(0) << message << std::endl; 94 network::Host::Broadcast(message);94 Host::Broadcast(message); 95 95 } 96 96 … … 104 104 std::string message = player->getName() + " left the game"; 105 105 COUT(0) << message << std::endl; 106 network::Host::Broadcast(message);106 Host::Broadcast(message); 107 107 } 108 108 } … … 124 124 std::string message = player->getOldName() + " changed name to " + player->getName(); 125 125 COUT(0) << message << std::endl; 126 network::Host::Broadcast(message);126 Host::Broadcast(message); 127 127 } 128 128 } -
code/branches/objecthierarchy/src/orxonox/objects/infos/HumanPlayer.cc
r2072 r2112 67 67 void HumanPlayer::registerVariables() 68 68 { 69 REGISTERSTRING(this->synchronize_nick_, network::direction::toserver, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick));69 REGISTERSTRING(this->synchronize_nick_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_changednick)); 70 70 71 REGISTERDATA(this->clientID_, network::direction::toclient, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged));72 REGISTERDATA(this->server_ready_, network::direction::toclient, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_ready));73 REGISTERDATA(this->client_ready_, network::direction::toserver, new network::NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_ready));71 REGISTERDATA(this->clientID_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_clientIDchanged)); 72 REGISTERDATA(this->server_ready_, direction::toclient, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_server_ready)); 73 REGISTERDATA(this->client_ready_, direction::toserver, new NetworkCallback<HumanPlayer>(this, &HumanPlayer::networkcallback_client_ready)); 74 74 } 75 75 … … 92 92 void HumanPlayer::networkcallback_clientIDchanged() 93 93 { 94 if (this->clientID_ == network::Host::getPlayerID())94 if (this->clientID_ == Host::getPlayerID()) 95 95 { 96 96 this->bLocalPlayer_ = true; … … 99 99 100 100 if (!Core::isMaster()) 101 this->setObjectMode( network::direction::bidirectional);101 this->setObjectMode(direction::bidirectional); 102 102 else 103 103 this->setName(this->nick_); … … 125 125 float HumanPlayer::getPing() const 126 126 { 127 return network::ClientInformation::findClient(this->getClientID())->getRTT();127 return ClientInformation::findClient(this->getClientID())->getRTT(); 128 128 } 129 129 130 130 float HumanPlayer::getPacketLossRatio() const 131 131 { 132 return network::ClientInformation::findClient(this->getClientID())->getPacketLoss();132 return ClientInformation::findClient(this->getClientID())->getPacketLoss(); 133 133 } 134 134 -
code/branches/objecthierarchy/src/orxonox/objects/infos/Info.cc
r2072 r2112 34 34 namespace orxonox 35 35 { 36 Info::Info(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)36 Info::Info(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 37 37 { 38 38 RegisterObject(Info); -
code/branches/objecthierarchy/src/orxonox/objects/infos/Info.h
r2072 r2112 37 37 namespace orxonox 38 38 { 39 class _OrxonoxExport Info : public BaseObject, public network::Synchronisable39 class _OrxonoxExport Info : public BaseObject, public Synchronisable 40 40 { 41 41 public: -
code/branches/objecthierarchy/src/orxonox/objects/infos/Level.cc
r2086 r2112 81 81 void Level::registerVariables() 82 82 { 83 REGISTERSTRING(this->xmlfilename_, network::direction::toclient, new network::NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile));84 REGISTERSTRING(this->name_, network::direction::toclient, new network::NetworkCallback<Level>(this, &Level::changedName));85 REGISTERSTRING(this->description_, network::direction::toclient);83 REGISTERSTRING(this->xmlfilename_, direction::toclient, new NetworkCallback<Level>(this, &Level::networkcallback_applyXMLFile)); 84 REGISTERSTRING(this->name_, direction::toclient, new NetworkCallback<Level>(this, &Level::changedName)); 85 REGISTERSTRING(this->description_, direction::toclient); 86 86 } 87 87 -
code/branches/objecthierarchy/src/orxonox/objects/infos/PlayerInfo.cc
r2072 r2112 42 42 RegisterObject(PlayerInfo); 43 43 44 this->clientID_ = network::CLIENTID_UNKNOWN;44 this->clientID_ = CLIENTID_UNKNOWN; 45 45 this->bHumanPlayer_ = false; 46 46 this->bLocalPlayer_ = false; … … 48 48 this->controller_ = 0; 49 49 this->controllableEntity_ = 0; 50 this->controllableEntityID_ = network::CLIENTID_UNKNOWN;50 this->controllableEntityID_ = CLIENTID_UNKNOWN; 51 51 52 52 this->registerVariables(); … … 69 69 void PlayerInfo::registerVariables() 70 70 { 71 REGISTERSTRING(this->name_, network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName));72 REGISTERDATA (this->controllableEntityID_, network::direction::toclient, new network::NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID));73 REGISTERDATA (this->bReadyToSpawn_, network::direction::toserver);71 REGISTERSTRING(this->name_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::changedName)); 72 REGISTERDATA (this->controllableEntityID_, direction::toclient, new NetworkCallback<PlayerInfo>(this, &PlayerInfo::networkcallback_changedcontrollableentityID)); 73 REGISTERDATA (this->bReadyToSpawn_, direction::toserver); 74 74 } 75 75 … … 126 126 else 127 127 { 128 this->controllableEntityID_ = network::OBJECTID_UNKNOWN;128 this->controllableEntityID_ = OBJECTID_UNKNOWN; 129 129 } 130 130 … … 138 138 { 139 139 this->controllableEntity_ = 0; 140 this->controllableEntityID_ = network::OBJECTID_UNKNOWN;140 this->controllableEntityID_ = OBJECTID_UNKNOWN; 141 141 142 142 if (this->controller_) … … 150 150 void PlayerInfo::networkcallback_changedcontrollableentityID() 151 151 { 152 if (this->controllableEntityID_ != network::OBJECTID_UNKNOWN)152 if (this->controllableEntityID_ != OBJECTID_UNKNOWN) 153 153 { 154 154 Synchronisable* temp = Synchronisable::getSynchronisable(this->controllableEntityID_); -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Billboard.cc
r2072 r2112 64 64 void Billboard::registerVariables() 65 65 { 66 REGISTERSTRING(this->material_, network::direction::toclient, new network::NetworkCallback<Billboard>(this, &Billboard::changedMaterial));67 REGISTERDATA (this->colour_, network::direction::toclient, new network::NetworkCallback<Billboard>(this, &Billboard::changedColour));66 REGISTERSTRING(this->material_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial)); 67 REGISTERDATA (this->colour_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour)); 68 68 } 69 69 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/BlinkingBillboard.cc
r2072 r2112 68 68 void BlinkingBillboard::registerVariables() 69 69 { 70 // REGISTERDATA(this->amplitude_, network::direction::toclient);71 // REGISTERDATA(this->frequency_, network::direction::toclient);72 // REGISTERDATA(this->phase_, network::direction::toclient);70 // REGISTERDATA(this->amplitude_, direction::toclient); 71 // REGISTERDATA(this->frequency_, direction::toclient); 72 // REGISTERDATA(this->phase_, direction::toclient); 73 73 } 74 74 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc
r2086 r2112 52 52 this->client_overwrite_ = 0; 53 53 this->player_ = 0; 54 this->playerID_ = network::OBJECTID_UNKNOWN;54 this->playerID_ = OBJECTID_UNKNOWN; 55 55 this->hud_ = 0; 56 56 this->camera_ = 0; … … 165 165 this->client_overwrite_ = this->server_overwrite_; 166 166 COUT(0) << "CE: bidirectional synchronization" << std::endl; 167 this->setObjectMode( network::direction::bidirectional);167 this->setObjectMode(direction::bidirectional); 168 168 } 169 169 } … … 176 176 177 177 this->player_ = 0; 178 this->playerID_ = network::OBJECTID_UNKNOWN;178 this->playerID_ = OBJECTID_UNKNOWN; 179 179 this->bControlled_ = false; 180 this->setObjectMode( network::direction::toclient);180 this->setObjectMode(direction::toclient); 181 181 182 182 if (this->bDestroyWhenPlayerLeft_) … … 187 187 { 188 188 // just do this in case the entity wasn't yet synchronized when the corresponding PlayerInfo got our objectID 189 if (this->playerID_ != network::OBJECTID_UNKNOWN)190 { 191 this->player_ = dynamic_cast<PlayerInfo*>( network::Synchronisable::getSynchronisable(this->playerID_));189 if (this->playerID_ != OBJECTID_UNKNOWN) 190 { 191 this->player_ = dynamic_cast<PlayerInfo*>(Synchronisable::getSynchronisable(this->playerID_)); 192 192 if (this->player_ && (this->player_->getControllableEntity() != this)) 193 193 this->player_->startControl(this); … … 248 248 void ControllableEntity::registerVariables() 249 249 { 250 REGISTERSTRING(this->cameraPositionTemplate_, network::direction::toclient);251 252 REGISTERDATA(this->server_position_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));253 REGISTERDATA(this->server_velocity_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));254 REGISTERDATA(this->server_orientation_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));255 256 REGISTERDATA(this->server_overwrite_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));257 REGISTERDATA(this->client_overwrite_, network::direction::toserver);258 259 REGISTERDATA(this->client_position_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition));260 REGISTERDATA(this->client_velocity_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity));261 REGISTERDATA(this->client_orientation_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation));262 263 264 REGISTERDATA(this->playerID_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID));250 REGISTERSTRING(this->cameraPositionTemplate_, direction::toclient); 251 252 REGISTERDATA(this->server_position_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition)); 253 REGISTERDATA(this->server_velocity_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity)); 254 REGISTERDATA(this->server_orientation_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation)); 255 256 REGISTERDATA(this->server_overwrite_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite)); 257 REGISTERDATA(this->client_overwrite_, direction::toserver); 258 259 REGISTERDATA(this->client_position_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition)); 260 REGISTERDATA(this->client_velocity_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity)); 261 REGISTERDATA(this->client_orientation_, direction::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation)); 262 263 264 REGISTERDATA(this->playerID_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID)); 265 265 } 266 266 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Light.cc
r2072 r2112 79 79 void Light::registerVariables() 80 80 { 81 REGISTERDATA(this->type_, network::direction::toclient, new network::NetworkCallback<Light>(this, &Light::changedType));82 REGISTERDATA(this->light_->getDiffuseColour(), network::direction::toclient);83 REGISTERDATA(this->light_->getSpecularColour(), network::direction::toclient);84 REGISTERDATA(this->light_->getDirection(), network::direction::toclient);81 REGISTERDATA(this->type_, direction::toclient, new NetworkCallback<Light>(this, &Light::changedType)); 82 REGISTERDATA(this->light_->getDiffuseColour(), direction::toclient); 83 REGISTERDATA(this->light_->getSpecularColour(), direction::toclient); 84 REGISTERDATA(this->light_->getDirection(), direction::toclient); 85 85 } 86 86 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/Model.cc
r2072 r2112 61 61 void Model::registerVariables() 62 62 { 63 REGISTERSTRING(this->meshSrc_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedMesh));64 REGISTERDATA(this->bCastShadows_, network::direction::toclient, new network::NetworkCallback<Model>(this, &Model::changedShadows));63 REGISTERSTRING(this->meshSrc_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedMesh)); 64 REGISTERDATA(this->bCastShadows_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedShadows)); 65 65 } 66 66 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/MovableEntity.cc
r2072 r2112 84 84 void MovableEntity::registerVariables() 85 85 { 86 REGISTERDATA(this->velocity_.x, network::direction::toclient);87 REGISTERDATA(this->velocity_.y, network::direction::toclient);88 REGISTERDATA(this->velocity_.z, network::direction::toclient);86 REGISTERDATA(this->velocity_.x, direction::toclient); 87 REGISTERDATA(this->velocity_.y, direction::toclient); 88 REGISTERDATA(this->velocity_.z, direction::toclient); 89 89 90 REGISTERDATA(this->rotationAxis_.x, network::direction::toclient);91 REGISTERDATA(this->rotationAxis_.y, network::direction::toclient);92 REGISTERDATA(this->rotationAxis_.z, network::direction::toclient);90 REGISTERDATA(this->rotationAxis_.x, direction::toclient); 91 REGISTERDATA(this->rotationAxis_.y, direction::toclient); 92 REGISTERDATA(this->rotationAxis_.z, direction::toclient); 93 93 94 REGISTERDATA(this->rotationRate_, network::direction::toclient);94 REGISTERDATA(this->rotationRate_, direction::toclient); 95 95 96 REGISTERDATA(this->overwrite_position_, network::direction::toclient, new network::NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition));97 REGISTERDATA(this->overwrite_orientation_, network::direction::toclient, new network::NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation));96 REGISTERDATA(this->overwrite_position_, direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition)); 97 REGISTERDATA(this->overwrite_orientation_, direction::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation)); 98 98 } 99 99 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/MovableEntity.h
r2072 r2112 38 38 namespace orxonox 39 39 { 40 class _OrxonoxExport MovableEntity : public WorldEntity, public Tickable, public network::ClientConnectionListener40 class _OrxonoxExport MovableEntity : public WorldEntity, public Tickable, public ClientConnectionListener 41 41 { 42 42 public: -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/ParticleEmitter.cc
r2072 r2112 74 74 void ParticleEmitter::registerVariables() 75 75 { 76 REGISTERSTRING(this->source_, network::direction::toclient, new network::NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged));77 REGISTERDATA (this->LOD_, network::direction::toclient, new network::NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged));76 REGISTERSTRING(this->source_, direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::sourceChanged)); 77 REGISTERDATA (this->LOD_, direction::toclient, new NetworkCallback<ParticleEmitter>(this, &ParticleEmitter::LODchanged)); 78 78 } 79 79 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/PositionableEntity.cc
r2072 r2112 48 48 void PositionableEntity::registerVariables() 49 49 { 50 REGISTERDATA(this->getPosition().x, network::direction::toclient);51 REGISTERDATA(this->getPosition().y, network::direction::toclient);52 REGISTERDATA(this->getPosition().z, network::direction::toclient);50 REGISTERDATA(this->getPosition().x, direction::toclient); 51 REGISTERDATA(this->getPosition().y, direction::toclient); 52 REGISTERDATA(this->getPosition().z, direction::toclient); 53 53 54 REGISTERDATA(this->getOrientation().w, network::direction::toclient);55 REGISTERDATA(this->getOrientation().x, network::direction::toclient);56 REGISTERDATA(this->getOrientation().y, network::direction::toclient);57 REGISTERDATA(this->getOrientation().z, network::direction::toclient);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); 58 58 } 59 59 } -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.cc
r2072 r2112 48 48 const Vector3 WorldEntity::UP = Vector3::UNIT_Y; 49 49 50 WorldEntity::WorldEntity(BaseObject* creator) : BaseObject(creator), network::Synchronisable(creator)50 WorldEntity::WorldEntity(BaseObject* creator) : BaseObject(creator), Synchronisable(creator) 51 51 { 52 52 RegisterObject(WorldEntity); … … 95 95 void WorldEntity::registerVariables() 96 96 { 97 REGISTERDATA(this->bActive_, network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));98 REGISTERDATA(this->bVisible_, network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));97 REGISTERDATA(this->bActive_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity)); 98 REGISTERDATA(this->bVisible_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility)); 99 99 100 REGISTERDATA(this->getScale3D().x, network::direction::toclient);101 REGISTERDATA(this->getScale3D().y, network::direction::toclient);102 REGISTERDATA(this->getScale3D().z, network::direction::toclient);100 REGISTERDATA(this->getScale3D().x, direction::toclient); 101 REGISTERDATA(this->getScale3D().y, direction::toclient); 102 REGISTERDATA(this->getScale3D().z, direction::toclient); 103 103 104 REGISTERDATA(this->parentID_, network::direction::toclient, new network::NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));104 REGISTERDATA(this->parentID_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent)); 105 105 } 106 106 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/WorldEntity.h
r2072 r2112 42 42 namespace orxonox 43 43 { 44 class _OrxonoxExport WorldEntity : public BaseObject, public network::Synchronisable44 class _OrxonoxExport WorldEntity : public BaseObject, public Synchronisable 45 45 { 46 46 public: -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2072 r2112 70 70 void Pawn::registerVariables() 71 71 { 72 REGISTERDATA(this->bAlive_, network::direction::toclient);73 REGISTERDATA(this->health_, network::direction::toclient);72 REGISTERDATA(this->bAlive_, direction::toclient); 73 REGISTERDATA(this->health_, direction::toclient); 74 74 } 75 75 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
r2072 r2112 82 82 void SpaceShip::registerVariables() 83 83 { 84 REGISTERDATA(this->maxSpeed_, network::direction::toclient);85 REGISTERDATA(this->maxSecondarySpeed_, network::direction::toclient);86 REGISTERDATA(this->maxRotation_, network::direction::toclient);87 REGISTERDATA(this->translationAcceleration_, network::direction::toclient);88 REGISTERDATA(this->rotationAcceleration_, network::direction::toclient);89 REGISTERDATA(this->translationDamping_, network::direction::toclient);84 REGISTERDATA(this->maxSpeed_, direction::toclient); 85 REGISTERDATA(this->maxSecondarySpeed_, direction::toclient); 86 REGISTERDATA(this->maxRotation_, direction::toclient); 87 REGISTERDATA(this->translationAcceleration_, direction::toclient); 88 REGISTERDATA(this->rotationAcceleration_, direction::toclient); 89 REGISTERDATA(this->translationDamping_, direction::toclient); 90 90 } 91 91 -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/pawns/Spectator.cc
r2072 r2112 84 84 void Spectator::registerVariables() 85 85 { 86 REGISTERDATA(this->bGreetingFlareVisible_, network::direction::toclient, new network::NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));87 REGISTERDATA(this->bGreeting_, network::direction::toserver, new network::NetworkCallback<Spectator>(this, &Spectator::changedGreeting));88 REGISTERDATA(this->hudmode_, network::direction::toclient);86 REGISTERDATA(this->bGreetingFlareVisible_, direction::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility)); 87 REGISTERDATA(this->bGreeting_, direction::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting)); 88 REGISTERDATA(this->hudmode_, direction::toclient); 89 89 } 90 90 … … 129 129 ControllableEntity::setPlayer(player); 130 130 131 // this->setObjectMode( network::direction::toclient);131 // this->setObjectMode(direction::toclient); 132 132 } 133 133 -
code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.cc
r2072 r2112 72 72 std::string text; 73 73 74 if (senderID != network::CLIENTID_UNKNOWN)74 if (senderID != CLIENTID_UNKNOWN) 75 75 { 76 76 std::string name = "unknown"; -
code/branches/objecthierarchy/src/orxonox/overlays/hud/ChatOverlay.h
r2072 r2112 39 39 namespace orxonox 40 40 { 41 class _OrxonoxExport ChatOverlay : public OverlayText, public network::ChatListener41 class _OrxonoxExport ChatOverlay : public OverlayText, public ChatListener 42 42 { 43 43 public:
Note: See TracChangeset
for help on using the changeset viewer.