diff options
author | Stijn Buys <ingar@osirion.org> | 2011-05-11 14:48:17 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2011-05-11 14:48:17 +0000 |
commit | 1c63cbf204b1d2c667ce9f821ccb197d0ffb0ac3 (patch) | |
tree | c2d0ff7cc4a8a264657abd0ac99017a5b664ecd2 /src/core/entity.h | |
parent | bb0f860989f84b901f80017ae0139a3fc0446dc1 (diff) |
Review of the main loop timer, converted timers from float to unsigned long,
corrected a number of timing bugs, improved client framerate stability.
Diffstat (limited to 'src/core/entity.h')
-rw-r--r-- | src/core/entity.h | 11 |
1 files changed, 7 insertions, 4 deletions
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; |