Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 30, 2005, 3:27:36 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: now Objects should be affected by the PhysicsEngine too

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/physics/physics_engine.cc

    r4395 r4396  
    140140void PhysicsEngine::tick(float dt)
    141141{
    142   tIterator<PhysicsConnection>* iterator = this->connections->getIterator();
    143   PhysicsConnection* enumConn = iterator->nextElement();
    144   while (enumConn)
     142  tIterator<PhysicsConnection>* itPC = this->connections->getIterator();
     143  PhysicsConnection* enumPC = itPC->nextElement();
     144  while (enumPC)
    145145    {
    146       enumConn->apply();
    147       enumConn = iterator->nextElement();
     146      enumPC->apply();
     147      enumPC = itPC->nextElement();
    148148    }
    149   delete iterator;
     149  delete itPC;
     150
     151
     152  tIterator<PhysicsInterface>* itPI = this->interfaces->getIterator();
     153  PhysicsInterface* enumPI = itPI->nextElement();
     154  while (enumPI)
     155    {
     156      enumPI->tickPhys(dt);
     157      enumPI = itPI->nextElement();
     158    }
     159  delete itPI;
    150160}
    151161
Note: See TracChangeset for help on using the changeset viewer.