Changeset 4949 in orxonox.OLD for orxonox/trunk/src/world_entities/weapons/weapon.cc
- Timestamp:
- Jul 24, 2005, 3:11:36 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/world_entities/weapons/weapon.cc
r4948 r4949 301 301 bool Weapon::deactivateW() 302 302 { 303 if (this->currentState != WS_INACTIVE)303 // if (this->currentState != WS_INACTIVE) 304 304 { 305 305 PRINTF(4)("Deactivating the Weapon %s\n", this->getName()); … … 403 403 inline void Weapon::enterState(WeaponState state) 404 404 { 405 PRINTF(3)("ENTERING STATE %s\n", stateToChar(state)); 405 406 // playing animation if availiable 406 407 if (likely(this->animation[state] != NULL)) … … 427 428 this->stateDuration -= dt; 428 429 429 if (this->isActive()) 430 { 431 if (this->stateDuration <= 0.0) 432 { 433 if (unlikely (this->currentState == WS_DEACTIVATING)) 434 { 435 this->currentState = WS_INACTIVE; 436 return; 437 } 438 else 439 this->currentState = WS_IDLE; 440 441 if (this->requestedAction != WA_NONE) 442 { 443 this->stateDuration = -dt; 444 this->execute(); 445 } 430 if (this->stateDuration <= 0.0) 431 { 432 if (unlikely (this->currentState == WS_DEACTIVATING)) 433 { 434 this->currentState = WS_INACTIVE; 435 return; 436 } 437 else 438 this->currentState = WS_IDLE; 439 440 if (this->requestedAction != WA_NONE) 441 { 442 this->stateDuration = -dt; 443 this->execute(); 446 444 } 447 445 }
Note: See TracChangeset
for help on using the changeset viewer.