Changeset 5376 in orxonox.OLD for trunk/src/lib/graphics/render2D
- Timestamp:
- Oct 13, 2005, 2:11:05 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/render2D/element_2d.cc
r5354 r5376 622 622 if (unlikely(this->toCoordinate != NULL)) 623 623 { 624 Vector moveVect = (*this->toCoordinate - this-> getRelCoor2D()) *fabsf(dt)*bias;624 Vector moveVect = (*this->toCoordinate - this->relCoordinate) *fabsf(dt)*bias; 625 625 626 626 if (likely(moveVect.len() >= .001))//PNODE_ITERATION_DELTA)) … … 630 630 else 631 631 { 632 delete this->toCoordinate; 633 this->toCoordinate = NULL; 632 this->setRelCoor2D(*this->toCoordinate+moveVect); 634 633 PRINTF(5)("SmoothMove of %s finished\n", this->getName()); 635 634 } … … 637 636 if (unlikely(this->toDirection != NULL)) 638 637 { 639 float rotFlot = (*this->toDirection - this-> getRelDir2D()) *fabsf(dt)*bias;640 if (likely( rotFlot>= .001))//PNODE_ITERATION_DELTA))638 float rotFlot = (*this->toDirection - this->relDirection) *fabsf(dt)*bias; 639 if (likely(fabsf(rotFlot) >= .001))//PNODE_ITERATION_DELTA)) 641 640 { 642 641 this->shiftDir2D(rotFlot); … … 644 643 else 645 644 { 646 delete this->toDirection; 647 this->toDirection = NULL; 645 this->setRelDir2D(*this->toDirection+rotFlot); 648 646 PRINTF(5)("SmoothRotate of %s finished\n", this->getName()); 649 647 } … … 722 720 { 723 721 this->prevRelDirection = this->relDirection; 724 this->absDirection = this->getAbsDir2D() *this->relDirection;722 this->absDirection = this->getAbsDir2D() + this->relDirection; 725 723 } 726 724 }
Note: See TracChangeset
for help on using the changeset viewer.