From fdb2b65bf7931e023e1a95cee004808525f6bce6 Mon Sep 17 00:00:00 2001 From: Mark Vejvoda Date: Fri, 28 Oct 2011 00:51:01 +0000 Subject: [PATCH] make transition to new command less choppy --- source/glest_game/type_instances/unit.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/source/glest_game/type_instances/unit.cpp b/source/glest_game/type_instances/unit.cpp index 7394e725..0bea28c7 100644 --- a/source/glest_game/type_instances/unit.cpp +++ b/source/glest_game/type_instances/unit.cpp @@ -1535,11 +1535,6 @@ void Unit::updateTimedParticles() { bool Unit::update() { assert(progress <= 1.f); - if(changedActiveCommand) { - changedActiveCommand = false; - return true; - } - //highlight if(highlight > 0.f) { const Game *game = Renderer::getInstance().getGame(); @@ -1817,6 +1812,15 @@ bool Unit::update() { } } + if(changedActiveCommand) { + changedActiveCommand = false; + highlight = 0.0f; + lastAnimProgress = 0.0f; + animProgress = 0.0f; + progress = 0.0f; + return_value = true; + } + return return_value; }