Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-10-16 15:41:50 +0400
committerKester Maddock <Christopher.Maddock.1@uni.massey.ac.nz>2004-10-16 15:41:50 +0400
commit7b2567924b9b86961cd4c07b76653f49939cab1c (patch)
treeadcf1091db6f3f78c05c6b02c567a9b77fc10092 /source/gameengine/Ketsji/KX_KetsjiEngine.h
parent063982914038ecd578bab7849a1e94cccbb8d8b9 (diff)
Switch fixed time system. Logic updates should now happen at 30Hz, physics at 60Hz. (By default, use Python to set.) Some actuators still run at framerate (IPO, Action) for nice smooth animation, and an excuse to buy high end hardware.
Keyboard sensors can now hook escape key. Ctrl-Break can be used from within blender if you've forgotten an end game actuator. Fixed a stupid bug preventing some actuators working (like TrackTo).
Diffstat (limited to 'source/gameengine/Ketsji/KX_KetsjiEngine.h')
-rw-r--r--source/gameengine/Ketsji/KX_KetsjiEngine.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h
index 79baf09f597..9a6f18a5c5f 100644
--- a/source/gameengine/Ketsji/KX_KetsjiEngine.h
+++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h
@@ -97,11 +97,10 @@ private:
bool m_bFixedTime;
bool m_firstframe;
+
double m_previoustime;
- double m_missedtime;
- double m_lasttime; // old style time
- double m_dtime;
- std::vector<double> m_deltatimes;
+ double m_deltatime;
+ static double m_ticrate;
int m_exitcode;
STR_String m_exitstring;
@@ -167,8 +166,6 @@ private:
/** Blue component of framing bar color. */
float m_overrideFrameColorB;
- double CalculateAverage(double newdeltatime);
-
void SetupRenderFrame(KX_Scene *scene);
void RenderFrame(KX_Scene* scene);
void RenderDebugProperties();
@@ -234,6 +231,15 @@ public:
* @return Current setting for display all frames.
*/
bool GetUseFixedTime(void) const;
+
+ /**
+ * Gets the number of logic updates per second.
+ */
+ static double GetTicRate();
+ /**
+ * Sets the number of logic updates per second.
+ */
+ static void SetTicRate(double ticrate);
/**
* Activates or deactivates timing information display.