From bff072039addc2c1235bc500198e2cd11040ceed Mon Sep 17 00:00:00 2001 From: fgenesis Date: Mon, 18 Jul 2016 23:22:42 +0200 Subject: [PATCH] Addition to prev. commit: Fix this in a better way. This also gets rid of a 1-frame delay in DSQ action handling. Hope this doesn't cause any problems, as i'm not sure. --- Aquaria/DSQ.cpp | 6 ++---- BBGE/Core.cpp | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Aquaria/DSQ.cpp b/Aquaria/DSQ.cpp index 98bb868..ea6244d 100644 --- a/Aquaria/DSQ.cpp +++ b/Aquaria/DSQ.cpp @@ -3835,10 +3835,11 @@ void DSQ::onUpdate(float dt) } dsq->resetTimer(); dsq->sound->resume(); - pollEvents(sec); // poll events again to reset internal state; else the ActionMapper::onUpdate() below triggers another ACTION_ESCAPE to re-pause the cutscene } } + Core::onUpdate(dt); + mod.update(dt); @@ -3869,9 +3870,6 @@ void DSQ::onUpdate(float dt) subtitlePlayer.update(dt); - - Core::onUpdate(dt); - demo.update(dt); // HACK: not optimal diff --git a/BBGE/Core.cpp b/BBGE/Core.cpp index 1706879..37b8ca4 100644 --- a/BBGE/Core.cpp +++ b/BBGE/Core.cpp @@ -680,15 +680,15 @@ bool Core::initInputLibrary() void Core::onUpdate(float dt) { if (minimized) return; - ActionMapper::onUpdate(dt); - StateManager::onUpdate(dt); - core->mouse.lastPosition = core->mouse.position; core->mouse.lastScrollWheel = core->mouse.scrollWheel; pollEvents(dt); + ActionMapper::onUpdate(dt); + StateManager::onUpdate(dt); + onMouseInput(); globalScale.update(dt);