Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4385 in orxonox.OLD


Ignore:
Timestamp:
May 29, 2005, 10:19:43 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: small efficiency update

Location:
orxonox/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/particles/particle_system.cc

    r4378 r4385  
    242242    {
    243243      // applying force to the System.
    244       tickPart->velocity += tickPart->extForce * tickPart->mass;
     244      if (likely (tickPart->mass > 0.0))
     245        tickPart->velocity += tickPart->extForce / tickPart->mass;
    245246
    246247      // rendering new position.
     
    271272        tickPart->velocity = tickPart->velocity * this->conserve;
    272273      // find out if we have to delete tickPart
    273       if ((tickPart->lifeCycle += dt/tickPart->lifeTime) >= 1.0)
     274      if (unlikely((tickPart->lifeCycle += dt/tickPart->lifeTime) >= 1.0))
    274275        {
    275276          // remove the particle from the list
  • orxonox/trunk/src/subprojects/particles/particle_fun.cc

    r4383 r4385  
    411411      //  Window::mainWindow->connectSignal("remove", this, GuiExec::quitGui);
    412412      Window::mainWindow->connectSignal("destroy", NULL, quitGui);
     413      windowBox->fill(quitButton);
    413414     
    414       windowBox->fill(quitButton);
    415415    }
    416416    guiMainWindow->fill(windowBox);
Note: See TracChangeset for help on using the changeset viewer.