X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fmoof%2Ftimer.hh;fp=src%2Fmoof%2Ftimer.hh;h=f9545eb4f4149810cbf78bc7b605f3948c24c17f;hp=9f3e9846096d7e09600a053ea929c66e7af91d19;hb=6c9943707d4f33035830eba0587a61a34eaecbc2;hpb=af88821a172c4dfd138b91b2a5148ae50b502fa2 diff --git a/src/moof/timer.hh b/src/moof/timer.hh index 9f3e984..f9545eb 100644 --- a/src/moof/timer.hh +++ b/src/moof/timer.hh @@ -296,11 +296,10 @@ class game_time : public timer_source { public: - game_time(scalar timestep) : - timestep_(timestep), + game_time(scalar timestep = SCALAR(1.0)) : scale_(timestep) { - reset(); + reset(timestep); } scalar ticks() const @@ -313,6 +312,11 @@ public: reference_ = SCALAR(0.0); ticks_ = 0; } + void reset(scalar timestep) + { + reset(); + timestep_ = timestep; + } void scale(scalar factor) {