diff --git a/panda/src/express/clockObject.I b/panda/src/express/clockObject.I index 63c6056c37..140b923e24 100644 --- a/panda/src/express/clockObject.I +++ b/panda/src/express/clockObject.I @@ -156,6 +156,9 @@ get_net_frame_rate() const { //////////////////////////////////////////////////////////////////// INLINE double ClockObject:: get_dt() const { + if (_max_dt > 0.0) { + return min(_max_dt, _dt); + } return _dt; } diff --git a/panda/src/express/clockObject.cxx b/panda/src/express/clockObject.cxx index 38ff3bef06..1fc669e4fd 100644 --- a/panda/src/express/clockObject.cxx +++ b/panda/src/express/clockObject.cxx @@ -139,9 +139,6 @@ tick() { case M_normal: // Time runs as it will; we simply report time elapsing. _dt = _actual_frame_time - old_time; - if (_max_dt > 0.0) { - _dt = min(_max_dt, _dt); - } _reported_frame_time = _actual_frame_time; break; @@ -176,9 +173,6 @@ tick() { _reported_frame_time = _actual_frame_time; } - if (_max_dt > 0.0) { - _dt = min(_max_dt, _dt); - } break; }