- Timestamp:
- Nov 12, 2008, 4:17:02 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/orxonox/objects/worldentities/ControllableEntity.cc
r2192 r2201 326 326 327 327 328 void ControllableEntity::setPosition(const Vector3& position) 329 { 330 if (Core::isMaster()) 331 { 332 this->node_->setPosition(position); 333 this->server_position_ = position; 334 ++this->server_overwrite_; 335 } 336 else if (this->bControlled_) 337 { 338 this->node_->setPosition(position); 328 // virtual void PositionChanged() { } 329 void ControllableEntity::positionChanged(const Vector3& position) 330 { 331 if (Core::isMaster()) 332 { 333 this->server_position_ = this->getPosition(); 334 ++this->server_overwrite_; 335 } 336 else if (this->bControlled_) 337 { 339 338 this->client_position_ = position; 340 339 } … … 355 354 } 356 355 } 357 358 void ControllableEntity::translate (const Vector3& distance, Ogre::Node::TransformSpace relativeTo)356 // virtual void translateChanged() { } 357 void ControllableEntity::translateChanged(const Vector3& distance, Ogre::Node::TransformSpace relativeTo) 359 358 { 360 359 if (Core::isMaster()) … … 370 369 } 371 370 } 372 373 void ControllableEntity:: setOrientation(const Quaternion& orientation)371 // virtual void orientationChanged() { } 372 void ControllableEntity::orientationChanged(const Quaternion& orientation) 374 373 { 375 374 if (Core::isMaster()) … … 385 384 } 386 385 } 387 388 void ControllableEntity::rotate (const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo)386 // virtual void rotateChanged() { } 387 void ControllableEntity::rotateChanged(const Quaternion& rotation, Ogre::Node::TransformSpace relativeTo) 389 388 { 390 389 if (Core::isMaster()) … … 400 399 } 401 400 } 402 403 void ControllableEntity::yaw (const Degree& angle, Ogre::Node::TransformSpace relativeTo)401 // virtual void yawChanged() { } 402 void ControllableEntity::yawChanged(const Degree& angle, Ogre::Node::TransformSpace relativeTo) 404 403 { 405 404 if (Core::isMaster()) … … 415 414 } 416 415 } 417 418 void ControllableEntity::pitch (const Degree& angle, Ogre::Node::TransformSpace relativeTo)416 // virtual void pitchChanged() { } 417 void ControllableEntity::pitchChanged(const Degree& angle, Ogre::Node::TransformSpace relativeTo) 419 418 { 420 419 if (Core::isMaster()) … … 430 429 } 431 430 } 432 433 void ControllableEntity::roll (const Degree& angle, Ogre::Node::TransformSpace relativeTo)431 // virtual void rollChanged() { } 432 void ControllableEntity::rollChanged(const Degree& angle, Ogre::Node::TransformSpace relativeTo) 434 433 { 435 434 if (Core::isMaster()) … … 445 444 } 446 445 } 447 448 void ControllableEntity::lookAt (const Vector3& target, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)446 //virtual void lookAtChanged() { } 447 void ControllableEntity::lookAtChanged(const Vector3& target, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector) 449 448 { 450 449 if (Core::isMaster()) … … 460 459 } 461 460 } 462 463 void ControllableEntity:: setDirection(const Vector3& direction, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector)461 // virtual void directionChanged( ) { } 462 void ControllableEntity::directionChanged(const Vector3& direction, Ogre::Node::TransformSpace relativeTo, const Vector3& localDirectionVector) 464 463 { 465 464 if (Core::isMaster())
Note: See TracChangeset
for help on using the changeset viewer.