bnoazx005 / TDEngine2

TDEngine2 is a cross-platform game engine
Apache License 2.0
18 stars 4 forks source link

[Bug] The delta time value that is passed into Update method always equals to zero #7

Closed bnoazx005 closed 5 years ago

bnoazx005 commented 5 years ago

Bug report

This error is not a bug, but incomplete implementation of internal logic of CEngineCore. This task was in TODO list, but still hasn't been implemented.

Environment

Win32 (Win10) / Visual Studio 2017

Steps to reproduce the issue

1) Implement own IEngineListener. 2) Make it a listener of the engine's events (call IEngineCore::RegisterListener method). 3) Add an assertion into OnUpdate method that looks like that

assert(dt > 0.0f);

What's the expected result?

dt should equals to time that elapsed from the previous frame

What's the actual result?

dt always equals to 0.0 within OnUpdate method of IEngineListener