make transition to new command less choppy

This commit is contained in:
Mark Vejvoda 2011-10-28 00:51:01 +00:00
parent f2e497f855
commit fdb2b65bf7
1 changed files with 9 additions and 5 deletions

View File

@ -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;
}