Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5376 in orxonox.OLD for trunk/src/lib/graphics/render2D


Ignore:
Timestamp:
Oct 13, 2005, 2:11:05 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: fancy effects in Shell

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/render2D/element_2d.cc

    r5354 r5376  
    622622    if (unlikely(this->toCoordinate != NULL))
    623623    {
    624       Vector moveVect = (*this->toCoordinate - this->getRelCoor2D()) *fabsf(dt)*bias;
     624      Vector moveVect = (*this->toCoordinate - this->relCoordinate) *fabsf(dt)*bias;
    625625
    626626      if (likely(moveVect.len() >= .001))//PNODE_ITERATION_DELTA))
     
    630630      else
    631631      {
    632         delete this->toCoordinate;
    633         this->toCoordinate = NULL;
     632        this->setRelCoor2D(*this->toCoordinate+moveVect);
    634633        PRINTF(5)("SmoothMove of %s finished\n", this->getName());
    635634      }
     
    637636    if (unlikely(this->toDirection != NULL))
    638637    {
    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))
    641640      {
    642641        this->shiftDir2D(rotFlot);
     
    644643      else
    645644      {
    646         delete this->toDirection;
    647         this->toDirection = NULL;
     645        this->setRelDir2D(*this->toDirection+rotFlot);
    648646        PRINTF(5)("SmoothRotate of %s finished\n", this->getName());
    649647      }
     
    722720    {
    723721      this->prevRelDirection = this->relDirection;
    724       this->absDirection = this->getAbsDir2D() * this->relDirection;
     722      this->absDirection = this->getAbsDir2D() + this->relDirection;
    725723    }
    726724  }
Note: See TracChangeset for help on using the changeset viewer.