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_Scene.cpp
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_Scene.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_Scene.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp
index c44c9413538..f10ea902c96 100644
--- a/source/gameengine/Ketsji/KX_Scene.cpp
+++ b/source/gameengine/Ketsji/KX_Scene.cpp
@@ -944,7 +944,7 @@ void KX_Scene::CalculateVisibleMeshes(RAS_IRasterizer* rasty)
}
// logic stuff
-void KX_Scene::LogicBeginFrame(double curtime,double deltatime)
+void KX_Scene::LogicBeginFrame(double curtime)
{
// have a look at temp objects ...
int lastobj = m_tempObjectList->GetCount() - 1;
@@ -956,7 +956,7 @@ void KX_Scene::LogicBeginFrame(double curtime,double deltatime)
if (propval)
{
- float timeleft = propval->GetNumber() - deltatime;
+ float timeleft = propval->GetNumber() - 1.0/KX_KetsjiEngine::GetTicRate();
if (timeleft > 0)
{
@@ -973,14 +973,14 @@ void KX_Scene::LogicBeginFrame(double curtime,double deltatime)
// all object is the tempObjectList should have a clock
}
}
- m_logicmgr->BeginFrame(curtime,deltatime);
+ m_logicmgr->BeginFrame(curtime, 1.0/KX_KetsjiEngine::GetTicRate());
}
-void KX_Scene::LogicUpdateFrame(double curtime,double deltatime)
+void KX_Scene::LogicUpdateFrame(double curtime, bool frame)
{
- m_logicmgr->UpdateFrame(curtime,deltatime);
+ m_logicmgr->UpdateFrame(curtime, frame);
}