- Timestamp:
- Nov 22, 2008, 11:54:48 AM (16 years ago)
- Location:
- code/branches/network64/src/orxonox/objects/worldentities
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network64/src/orxonox/objects/worldentities/Billboard.cc
r2171 r2245 64 64 void Billboard::registerVariables() 65 65 { 66 REGISTERSTRING(this->material_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial));67 REGISTERDATA (this->colour_, direction::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour));66 registerVariable(this->material_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedMaterial)); 67 registerVariable(this->colour_, variableDirection::toclient, new NetworkCallback<Billboard>(this, &Billboard::changedColour)); 68 68 } 69 69 -
code/branches/network64/src/orxonox/objects/worldentities/ControllableEntity.cc
r2171 r2245 165 165 this->client_overwrite_ = this->server_overwrite_; 166 166 COUT(0) << "CE: bidirectional synchronization" << std::endl; 167 this->setObjectMode( direction::bidirectional);167 this->setObjectMode(objectDirection::bidirectional); 168 168 } 169 169 } … … 178 178 this->playerID_ = OBJECTID_UNKNOWN; 179 179 this->bControlled_ = false; 180 this->setObjectMode( direction::toclient);180 this->setObjectMode(objectDirection::toclient); 181 181 182 182 if (this->bDestroyWhenPlayerLeft_) … … 248 248 void ControllableEntity::registerVariables() 249 249 { 250 REGISTERSTRING(this->cameraPositionTemplate_, direction::toclient);251 252 REGISTERDATA(this->client_overwrite_, direction::toserver);253 254 REGISTERDATA(this->server_position_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition));255 REGISTERDATA(this->server_velocity_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity));256 REGISTERDATA(this->server_orientation_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation));257 REGISTERDATA(this->server_overwrite_, direction::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));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));250 registerVariable(this->cameraPositionTemplate_, variableDirection::toclient); 251 252 registerVariable(this->client_overwrite_, variableDirection::toserver); 253 254 registerVariable(this->server_position_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition)); 255 registerVariable(this->server_velocity_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerVelocity)); 256 registerVariable(this->server_orientation_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation)); 257 registerVariable(this->server_overwrite_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite)); 258 259 registerVariable(this->client_position_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition)); 260 registerVariable(this->client_velocity_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientVelocity)); 261 registerVariable(this->client_orientation_, variableDirection::toserver, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientOrientation)); 262 263 264 registerVariable(this->playerID_, variableDirection::toclient, new NetworkCallback<ControllableEntity>(this, &ControllableEntity::networkcallback_changedplayerID)); 265 265 } 266 266 -
code/branches/network64/src/orxonox/objects/worldentities/Light.cc
r2171 r2245 79 79 void Light::registerVariables() 80 80 { 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);81 registerVariable((int &)this->type_, variableDirection::toclient, new NetworkCallback<Light>(this, &Light::changedType)); 82 registerVariable(this->light_->getDiffuseColour(), variableDirection::toclient); 83 registerVariable(this->light_->getSpecularColour(), variableDirection::toclient); 84 registerVariable(this->light_->getDirection(), variableDirection::toclient); 85 85 } 86 86 -
code/branches/network64/src/orxonox/objects/worldentities/Model.cc
r2171 r2245 61 61 void Model::registerVariables() 62 62 { 63 REGISTERSTRING(this->meshSrc_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedMesh));64 REGISTERDATA(this->bCastShadows_, direction::toclient, new NetworkCallback<Model>(this, &Model::changedShadows));63 registerVariable(this->meshSrc_, variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedMesh)); 64 registerVariable(this->bCastShadows_, variableDirection::toclient, new NetworkCallback<Model>(this, &Model::changedShadows)); 65 65 } 66 66 -
code/branches/network64/src/orxonox/objects/worldentities/MovableEntity.cc
r2171 r2245 84 84 void MovableEntity::registerVariables() 85 85 { 86 REGISTERDATA(this->velocity_.x, direction::toclient);87 REGISTERDATA(this->velocity_.y, direction::toclient);88 REGISTERDATA(this->velocity_.z, direction::toclient);89 90 REGISTERDATA(this->rotationAxis_.x, direction::toclient);91 REGISTERDATA(this->rotationAxis_.y, direction::toclient);92 REGISTERDATA(this->rotationAxis_.z, direction::toclient);93 94 REGISTERDATA(this->rotationRate_, direction::toclient);95 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));86 registerVariable(this->velocity_.x, variableDirection::toclient); 87 registerVariable(this->velocity_.y, variableDirection::toclient); 88 registerVariable(this->velocity_.z, variableDirection::toclient); 89 90 registerVariable(this->rotationAxis_.x, variableDirection::toclient); 91 registerVariable(this->rotationAxis_.y, variableDirection::toclient); 92 registerVariable(this->rotationAxis_.z, variableDirection::toclient); 93 94 registerVariable(this->rotationRate_, variableDirection::toclient); 95 96 registerVariable(this->overwrite_position_, variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwritePosition)); 97 registerVariable(this->overwrite_orientation_, variableDirection::toclient, new NetworkCallback<MovableEntity>(this, &MovableEntity::overwriteOrientation)); 98 98 } 99 99 -
code/branches/network64/src/orxonox/objects/worldentities/ParticleEmitter.cc
r2171 r2245 75 75 void ParticleEmitter::registerVariables() 76 76 { 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)); 79 79 } 80 80 -
code/branches/network64/src/orxonox/objects/worldentities/PositionableEntity.cc
r2171 r2245 48 48 void PositionableEntity::registerVariables() 49 49 { 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); 53 53 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); 58 58 } 59 59 } -
code/branches/network64/src/orxonox/objects/worldentities/WorldEntity.cc
r2171 r2245 96 96 void WorldEntity::registerVariables() 97 97 { 98 REGISTERDATA(this->bActive_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity));99 REGISTERDATA(this->bVisible_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility));100 101 REGISTERDATA(this->getScale3D().x, direction::toclient);102 REGISTERDATA(this->getScale3D().y, direction::toclient);103 REGISTERDATA(this->getScale3D().z, direction::toclient);104 105 REGISTERDATA(this->parentID_, direction::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent));98 registerVariable(this->bActive_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedActivity)); 99 registerVariable(this->bVisible_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::changedVisibility)); 100 101 registerVariable(this->getScale3D().x, variableDirection::toclient); 102 registerVariable(this->getScale3D().y, variableDirection::toclient); 103 registerVariable(this->getScale3D().z, variableDirection::toclient); 104 105 registerVariable(this->parentID_, variableDirection::toclient, new NetworkCallback<WorldEntity>(this, &WorldEntity::updateParent)); 106 106 } 107 107 -
code/branches/network64/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2171 r2245 80 80 void Pawn::registerVariables() 81 81 { 82 REGISTERDATA(this->bAlive_, direction::toclient);83 REGISTERDATA(this->health_, direction::toclient);82 registerVariable(this->bAlive_, variableDirection::toclient); 83 registerVariable(this->health_, variableDirection::toclient); 84 84 } 85 85 -
code/branches/network64/src/orxonox/objects/worldentities/pawns/SpaceShip.cc
r2171 r2245 82 82 void SpaceShip::registerVariables() 83 83 { 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);84 registerVariable(this->maxSpeed_, variableDirection::toclient); 85 registerVariable(this->maxSecondarySpeed_, variableDirection::toclient); 86 registerVariable(this->maxRotation_, variableDirection::toclient); 87 registerVariable(this->translationAcceleration_, variableDirection::toclient); 88 registerVariable(this->rotationAcceleration_, variableDirection::toclient); 89 registerVariable(this->translationDamping_, variableDirection::toclient); 90 90 } 91 91 -
code/branches/network64/src/orxonox/objects/worldentities/pawns/Spectator.cc
r2171 r2245 86 86 void Spectator::registerVariables() 87 87 { 88 REGISTERDATA(this->bGreetingFlareVisible_, direction::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility));89 REGISTERDATA(this->bGreeting_, direction::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting));90 REGISTERDATA(this->hudmode_, direction::toclient);88 registerVariable(this->bGreetingFlareVisible_, variableDirection::toclient, new NetworkCallback<Spectator>(this, &Spectator::changedFlareVisibility)); 89 registerVariable(this->bGreeting_, variableDirection::toserver, new NetworkCallback<Spectator>(this, &Spectator::changedGreeting)); 90 registerVariable(this->hudmode_, variableDirection::toclient); 91 91 } 92 92
Note: See TracChangeset
for help on using the changeset viewer.