From 1c63cbf204b1d2c667ce9f821ccb197d0ffb0ac3 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Wed, 11 May 2011 14:48:17 +0000 Subject: Review of the main loop timer, converted timers from float to unsigned long, corrected a number of timing bugs, improved client framerate stability. --- src/core/entity.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/core/entity.h') diff --git a/src/core/entity.h b/src/core/entity.h index 230ce1b..164f746 100644 --- a/src/core/entity.h +++ b/src/core/entity.h @@ -263,8 +263,9 @@ public: /** * @brief runs one game frame for the entity * The default implementation does nothing + * @param elapsed elepased time since previous frame, in milliseconds */ - virtual void frame(float seconds); + virtual void frame(const unsigned long elapsed); /** * @brief runs one upkeep frame for the entity @@ -588,12 +589,13 @@ public: /// set event state virtual void set_state(int state); - /// runs one game frame for the entity /** + * @brief runs one game frame for the entity * The default implementation will update the position() of the entity, * determined by its speed() and axis() + * @param elapsed elepased time since previous frame, in milliseconds */ - virtual void frame(float seconds); + virtual void frame(const unsigned long elapsed); /** * @brief reset the physics state @@ -743,8 +745,9 @@ public: * @brief runs one game frame for the entity * The default implementation will set direction() and thrust() to the desired targets * and calls its parent frame() funcion. + * @param elapsed elepased time since previous frame, in milliseconds */ - virtual void frame(float seconds); + virtual void frame(const unsigned long elapsed); /// current thrust float entity_thrust; -- cgit v1.2.3