Changeset 8727 for code/trunk/src/orxonox/items/MultiStateEngine.cc
- Timestamp:
- Jul 3, 2011, 5:42:19 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/items/MultiStateEngine.cc
r6709 r8727 109 109 } 110 110 111 void MultiStateEngine:: tick(float dt)111 void MultiStateEngine::run(float dt) 112 112 { 113 113 if (this->getShip()) … … 117 117 if (this->getShip()->hasLocalController()) 118 118 { 119 const Vector3& direction = this->get Direction();119 const Vector3& direction = this->getSteering(); 120 120 bool forward = (direction.z < 0.0 && velocity.z < -FORWARD_EFFECT_VELOCITY_THRESHOLD); 121 121 122 122 this->state_ = 0; 123 if (this->getShip()-> getBoost() && forward)123 if (this->getShip()->isBoosting() && forward) 124 124 this->state_ = Boost; 125 125 else if (forward && !this->state_) // this->state_ == Boost … … 181 181 } 182 182 183 SUPER(MultiStateEngine, tick,dt);183 Engine::run(dt); 184 184 } 185 185
Note: See TracChangeset
for help on using the changeset viewer.