always start animations with a common start time

fixes #134
This commit is contained in:
Konstantin Käfer
2014-04-14 19:30:09 -04:00
parent 2e86f2582f
commit 9bb88711b8
8 changed files with 50 additions and 55 deletions

View File

@@ -433,8 +433,10 @@ bool Map::updateTiles() {
}
bool Map::render() {
double animationTime = platform::elapsed();
if (transform.needsAnimation()) {
transform.updateAnimations();
transform.updateAnimations(animationTime);
}
if (*style.sprite->raster && !style.sprite->raster->textured) {
@@ -469,7 +471,7 @@ bool Map::render() {
tile.data->raster->beginFadeInAnimation();
}
if (tile.data->use_raster && tile.data->raster->needsAnimation()) {
tile.data->raster->updateAnimations();
tile.data->raster->updateAnimations(animationTime);
}
painter.render(tile);
}