make transition to new command less choppy
This commit is contained in:
parent
f2e497f855
commit
fdb2b65bf7
|
@ -1535,11 +1535,6 @@ void Unit::updateTimedParticles() {
|
||||||
bool Unit::update() {
|
bool Unit::update() {
|
||||||
assert(progress <= 1.f);
|
assert(progress <= 1.f);
|
||||||
|
|
||||||
if(changedActiveCommand) {
|
|
||||||
changedActiveCommand = false;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//highlight
|
//highlight
|
||||||
if(highlight > 0.f) {
|
if(highlight > 0.f) {
|
||||||
const Game *game = Renderer::getInstance().getGame();
|
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;
|
return return_value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user