- Timestamp:
- Nov 2, 2008, 12:54:17 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/objects/worldentities
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.