Ignore:
Timestamp:
Apr 29, 2012, 11:55:32 PM (9 years ago)
Author:
sam
Message:

core: tick methods now use seconds, like any sane system.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emitter.cpp

    r1198 r1310  
    5151}
    5252
    53 void Emitter::TickGame(float deltams)
     53void Emitter::TickGame(float seconds)
    5454{
    5555    for (int i = 0; i < data->nparticles; i++)
    5656    {
    5757        vec3 oldvelocity = data->velocities[i];
    58         data->velocities[i] += deltams * data->gravity;
    59         data->positions[i] += deltams * 0.5f
     58        data->velocities[i] += seconds * data->gravity;
     59        data->positions[i] += seconds * 0.5f
    6060                                      * (oldvelocity + data->velocities[i]);
    6161        if (data->positions[i].y < -100)
     
    6868    }
    6969
    70     Entity::TickGame(deltams);
     70    Entity::TickGame(seconds);
    7171}
    7272
    73 void Emitter::TickDraw(float deltams)
     73void Emitter::TickDraw(float seconds)
    7474{
    75     Entity::TickDraw(deltams);
     75    Entity::TickDraw(seconds);
    7676
    7777    for (int i = 0; i < data->nparticles; i++)
Note: See TracChangeset for help on using the changeset viewer.