From 7b2567924b9b86961cd4c07b76653f49939cab1c Mon Sep 17 00:00:00 2001 From: Kester Maddock Date: Sat, 16 Oct 2004 11:41:50 +0000 Subject: 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). --- source/gameengine/GameLogic/SCA_IActuator.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'source/gameengine/GameLogic/SCA_IActuator.cpp') diff --git a/source/gameengine/GameLogic/SCA_IActuator.cpp b/source/gameengine/GameLogic/SCA_IActuator.cpp index 31e6d3fdb10..322936c7819 100644 --- a/source/gameengine/GameLogic/SCA_IActuator.cpp +++ b/source/gameengine/GameLogic/SCA_IActuator.cpp @@ -64,11 +64,6 @@ void SCA_IActuator::RemoveAllEvents() -bool SCA_IActuator::Update(double curtime,double deltatime) -{ - return true; -} - bool SCA_IActuator::IsNegativeEvent() const @@ -91,7 +86,19 @@ bool SCA_IActuator::IsNegativeEvent() const return !bPositiveEvent && bNegativeEvent; } +bool SCA_IActuator::Update(double curtime, bool frame) +{ + if (frame) + return Update(); + + return true; +} +bool SCA_IActuator::Update() +{ + assert(false && "Actuators should override an Update method."); + return false; +} void SCA_IActuator::ProcessReplica() { -- cgit v1.2.3