- Timestamp:
- Nov 30, 2015, 4:04:16 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/campaignHS15/src/orxonox/controllers/ActionpointController.cc
r10888 r10898 122 122 this->deltaHp = orxonox_cast<Pawn*> (this->getControllableEntity())->getHealth() - this->previousHp; 123 123 this->previousHp = orxonox_cast<Pawn*> (this->getControllableEntity())->getHealth(); 124 if (this->actionCounter_ % 2 == 0) 125 this->startAttackingEnemiesThatAreClose(); 124 // if (this->actionCounter_ % 2 == 0) 126 125 //No action -> pop one from stack 127 126 if (this->action_ == Action::NONE || this->bTakenOver_) … … 133 132 // this->parsedActionpoints_.push_back(point); 134 133 // } 134 this->startAttackingEnemiesThatAreClose(); 135 135 136 if (this->parsedActionpoints_.empty() && this->loopActionpoints_.empty()) 136 137 { … … 209 210 else if (this->action_ == Action::FLY) 210 211 { 212 this->startAttackingEnemiesThatAreClose(); 211 213 if (this->squaredDistanceToTarget() <= this->squaredaccuracy_) 212 214 { … … 217 219 else if (this->action_ == Action::PROTECT) 218 220 { 221 this->startAttackingEnemiesThatAreClose(); 219 222 if (!this->getProtect()) 220 223 { … … 226 229 else if (this->action_ == Action::ATTACK) 227 230 { 231 this->startAttackingEnemiesThatAreClose(); 228 232 if (!this->hasTarget()) 229 233 {
Note: See TracChangeset
for help on using the changeset viewer.