[Orxonox-commit 1398] r6116 - code/branches/presentation2/src/orxonox/controllers
scheusso at orxonox.net
scheusso at orxonox.net
Sat Nov 21 13:16:16 CET 2009
Author: scheusso
Date: 2009-11-21 13:16:16 +0100 (Sat, 21 Nov 2009)
New Revision: 6116
Modified:
code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
Log:
this should prevent unneccessary network traffic
Modified: code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc
===================================================================
--- code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc 2009-11-21 11:11:25 UTC (rev 6115)
+++ code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc 2009-11-21 12:16:16 UTC (rev 6116)
@@ -180,7 +180,8 @@
continue;
}
- this->getControllableEntity()->setTarget(wePtr);
+ if( this->getControllableEntity()->getTarget() != wePtr )
+ this->getControllableEntity()->setTarget(wePtr);
itr->movable->getParentSceneNode()->showBoundingBox(true);
//std::cout << itr->movable->getParentSceneNode()->_getDerivedPosition() << endl;
@@ -197,7 +198,8 @@
if ( pawn )
{
pawn->setAimPosition( mouseRay.getOrigin() + mouseRay.getDirection() * 1200 );
- pawn->setTarget( 0 );
+ if( this->getControllableEntity()->getTarget() != 0 )
+ pawn->setTarget( 0 );
}
More information about the Orxonox-commit
mailing list