Changeset 1718


Ignore:
Timestamp:
Aug 11, 2012, 12:10:59 PM (8 years ago)
Author:
sam
Message:

core: clamp deltatime to 15 fps to avoid erratic behaviour.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/ticker.cpp

    r1676 r1718  
    192192            data->deltatime = data->timer.Get();
    193193            data->bias += data->deltatime;
     194        }
     195
     196        /* Do not go below 15 fps */
     197        if (data->deltatime > 1.f / 15.f)
     198        {
     199            data->deltatime = 1.f / 15.f;
     200            data->bias = 0.f;
    194201        }
    195202
Note: See TracChangeset for help on using the changeset viewer.