Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 24, 2005, 3:44:37 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: momentum works correct now (i think)

File:
1 edited

Legend:

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

    r4690 r4691  
    271271      if (likely (tickPart->mass > 0.0))
    272272        tickPart->velocity += tickPart->extForce / tickPart->mass * dt;
    273 
    274273      // rendering new position.
    275274      tickPart->position += tickPart->velocity * dt;
     
    293292
    294293      if (this->conserve < 1.0)
    295         tickPart->velocity = tickPart->velocity * this->conserve;
     294      {
     295        tickPart->velocity *= this->conserve;
     296        tickPart->momentum *= this->conserve;
     297      }
    296298      // find out if we have to delete tickPart
    297299      if (unlikely((tickPart->lifeCycle += dt/tickPart->lifeTime) >= 1.0))
     
    550552   \brief outputs some nice debug information
    551553*/
    552 void ParticleSystem::debug(void)
     554void ParticleSystem::debug(void) const
    553555{
    554556  PRINT(0)("  ParticleSystem %s\n", this->getName());
Note: See TracChangeset for help on using the changeset viewer.