mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 10:54:24 -04:00
respect min_dt even in non-real-time mode
This commit is contained in:
parent
23f4c72116
commit
220c028394
@ -156,6 +156,9 @@ get_net_frame_rate() const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE double ClockObject::
|
INLINE double ClockObject::
|
||||||
get_dt() const {
|
get_dt() const {
|
||||||
|
if (_max_dt > 0.0) {
|
||||||
|
return min(_max_dt, _dt);
|
||||||
|
}
|
||||||
return _dt;
|
return _dt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,9 +139,6 @@ tick() {
|
|||||||
case M_normal:
|
case M_normal:
|
||||||
// Time runs as it will; we simply report time elapsing.
|
// Time runs as it will; we simply report time elapsing.
|
||||||
_dt = _actual_frame_time - old_time;
|
_dt = _actual_frame_time - old_time;
|
||||||
if (_max_dt > 0.0) {
|
|
||||||
_dt = min(_max_dt, _dt);
|
|
||||||
}
|
|
||||||
_reported_frame_time = _actual_frame_time;
|
_reported_frame_time = _actual_frame_time;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -176,9 +173,6 @@ tick() {
|
|||||||
_reported_frame_time = _actual_frame_time;
|
_reported_frame_time = _actual_frame_time;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_max_dt > 0.0) {
|
|
||||||
_dt = min(_max_dt, _dt);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user