Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2009, 1:16:16 PM (15 years ago)
Author:
scheusso
Message:

this should prevent unneccessary network traffic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2/src/orxonox/controllers/NewHumanController.cc

    r6115 r6116  
    181181                }
    182182               
    183                 this->getControllableEntity()->setTarget(wePtr);
     183                if( this->getControllableEntity()->getTarget() != wePtr )
     184                    this->getControllableEntity()->setTarget(wePtr);
    184185
    185186                itr->movable->getParentSceneNode()->showBoundingBox(true);
     
    198199        {
    199200            pawn->setAimPosition( mouseRay.getOrigin() + mouseRay.getDirection() * 1200 );
    200             pawn->setTarget( 0 );
     201            if( this->getControllableEntity()->getTarget() != 0 )
     202                pawn->setTarget( 0 );
    201203        }
    202204   
Note: See TracChangeset for help on using the changeset viewer.