Changeset 2836 for code/branches/netp2/src/orxonox
- Timestamp:
- Mar 23, 2009, 5:00:54 PM (16 years ago)
- Location:
- code/branches/netp2/src/orxonox/objects
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/netp2/src/orxonox/objects/controllers/AIController.cc
r2662 r2836 101 101 void AIController::tick(float dt) 102 102 { 103 if (!this->isActive()) 104 return; 105 106 if (this->target_) 107 this->aimAtTarget(); 108 109 if (this->bHasTargetPosition_) 110 this->moveToTargetPosition(dt); 111 112 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(500) && this->isLookingAtTarget(Ogre::Math::PI / 20.0)) 113 this->getControllableEntity()->fire(WeaponMode::fire); 103 if(Core::isMaster()) 104 { 105 if (!this->isActive()) 106 return; 107 108 if (this->target_) 109 this->aimAtTarget(); 110 111 if (this->bHasTargetPosition_) 112 this->moveToTargetPosition(dt); 113 114 if (this->getControllableEntity() && this->bShooting_ && this->isCloseAtTarget(500) && this->isLookingAtTarget(Ogre::Math::PI / 20.0)) 115 this->getControllableEntity()->fire(WeaponMode::fire); 116 } 114 117 115 118 SUPER(AIController, tick, dt); -
code/branches/netp2/src/orxonox/objects/worldentities/pawns/Pawn.cc
r2826 r2836 129 129 this->firehack_ = 0x0; 130 130 131 if (this->health_ <= 0) 131 if (Core::isMaster()) 132 if (this->health_ <= 0) 132 133 this->death(); 133 134 }
Note: See TracChangeset
for help on using the changeset viewer.