Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3601 in orxonox.OLD for orxonox/trunk/src/track_manager.cc


Ignore:
Timestamp:
Mar 18, 2005, 2:22:57 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: no more movement at the end of the Track

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/track_manager.cc

    r3599 r3601  
    732732              enumElem = tmpElem->children->nextElement();
    733733            }
    734          
    735          
    736         }
    737     }
     734        }
     735    }
     736  for (int i = 1; i <=trackElemCount;i++)
     737    if (this->findTrackElementByID(i)->endTime > this->maxTime)
     738      this->maxTime = findTrackElementByID(i)->endTime; // very bad implemented :/
    738739}
    739740
     
    747748Vector TrackManager::calcPos() const
    748749{
    749   //  PRINTF(0)("TrackElement:%d, localTime: %f\n",this->currentTrackElem->ID, this->localTime);
    750750  return this->currentTrackElem->curve->calcPos((this->localTime-this->currentTrackElem->startingTime)/this->currentTrackElem->duration);
    751751}
     
    780780  if (this->localTime <= this->firstTrackElem->duration)
    781781    this->jumpTo(this->localTime);
    782   this->localTime += dt;
     782  if (this->localTime <= this->maxTime)
     783    this->localTime += dt;
    783784  if (this->localTime > this->currentTrackElem->endTime
    784785      && this->currentTrackElem->children)
Note: See TracChangeset for help on using the changeset viewer.