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/orbital/particlesystem.h

    r1296 r1310  
    2121
    2222        for (int i = 0; i < 200; i++)
    23             m_particles.Append(vec3(0), vec3(0), RandF(0.f, 2000.f));
     23            m_particles.Append(vec3(0), vec3(0), RandF(0.f, 2.f));
    2424    }
    2525
     
    3131
    3232protected:
    33     virtual void TickGame(float deltams)
     33    virtual void TickGame(float seconds)
    3434    {
    35         WorldEntity::TickGame(deltams);
     35        WorldEntity::TickGame(seconds);
    3636
    3737        for (int i = 0; i < m_particles.Count(); i++)
    3838        {
    39             m_particles[i].m3 += deltams;
    40             if (m_particles[i].m3 > 2000.f)
     39            m_particles[i].m3 += seconds;
     40            if (m_particles[i].m3 > 2.f)
    4141            {
    4242                m_particles[i].m1 = vec3(RandF(-1.f, 1.f), RandF(-1.f, 1.f), RandF(-1.f, 1.f));
    4343                m_particles[i].m2 = normalize(vec3(RandF(-1.f, 1.f), RandF(-1.f, 1.f), RandF(-1.f, 1.f)));
    44                 m_particles[i].m3 = RandF(0.f, 2000.f);
     44                m_particles[i].m3 = RandF(0.f, 2.f);
    4545            }
    4646
    47             m_particles[i].m1 += deltams * .1f * m_particles[i].m2;
     47            m_particles[i].m1 += seconds * 100.f * m_particles[i].m2;
    4848        }
    4949
    50         m_angle += deltams * 0.1f;
     50        m_angle += seconds * 100.f;
    5151    }
    5252
    53     virtual void TickDraw(float deltams)
     53    virtual void TickDraw(float seconds)
    5454    {
    55         WorldEntity::TickDraw(deltams);
     55        WorldEntity::TickDraw(seconds);
    5656
    5757        if (!m_ready)
Note: See TracChangeset for help on using the changeset viewer.