Changeset 2065 for code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc
- Timestamp:
- Oct 30, 2008, 2:44:48 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/worldentities/ControllableEntity.cc
r2062 r2065 95 95 XMLPortParam(ControllableEntity, "camerapositiontemplate", setCameraPositionTemplate, getCameraPositionTemkplate, xmlelement, mode); 96 96 97 XMLPortObject(ControllableEntity, WorldEntity, "camerapositions", addCameraPosition, getCameraPosition, xmlelement, mode);97 XMLPortObject(ControllableEntity, CameraPosition, "camerapositions", addCameraPosition, getCameraPosition, xmlelement, mode); 98 98 } 99 99 … … 239 239 else if (this->bControlled_) 240 240 { 241 COUT(2) << "setting client position" << endl;241 // COUT(2) << "setting client position" << endl; 242 242 this->client_velocity_ = this->velocity_; 243 243 this->client_position_ = this->node_->getPosition(); … … 249 249 { 250 250 REGISTERSTRING(this->cameraPositionTemplate_, network::direction::toclient); 251 252 253 REGISTERDATA(this->client_overwrite_, network::direction::toserver);254 REGISTERDATA(this->server_overwrite_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite));255 251 256 252 REGISTERDATA(this->server_position_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerPosition)); … … 258 254 REGISTERDATA(this->server_orientation_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processServerOrientation)); 259 255 256 REGISTERDATA(this->server_overwrite_, network::direction::toclient, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processOverwrite)); 257 REGISTERDATA(this->client_overwrite_, network::direction::toserver); 260 258 261 259 REGISTERDATA(this->client_position_, network::direction::toserver, new network::NetworkCallback<ControllableEntity>(this, &ControllableEntity::processClientPosition)); … … 301 299 if (this->server_overwrite_ == this->client_overwrite_) 302 300 { 303 COUT(2) << "callback: setting client position" << endl;301 // COUT(2) << "callback: setting client position" << endl; 304 302 this->node_->setPosition(this->client_position_); 305 303 this->server_position_ = this->client_position_; 306 304 } 307 else308 COUT(2) << "callback: not setting client position" << endl;305 // else 306 // COUT(2) << "callback: not setting client position" << endl; 309 307 } 310 308 … … 458 456 else if (this->bControlled_) 459 457 { 460 //this->node_->lookAt(target, relativeTo, localDirectionVector);458 this->node_->lookAt(target, relativeTo, localDirectionVector); 461 459 this->client_orientation_ = this->node_->getOrientation(); 462 460 }
Note: See TracChangeset
for help on using the changeset viewer.