master
darkrose 2017-07-23 18:44:18 +10:00
parent d7a1c19912
commit ed36251850
1 changed files with 3 additions and 1 deletions

View File

@ -486,7 +486,9 @@ void MapBlockMesh::animate(float time)
const TileSpec &tile = it->second.tile;
// Figure out current frame
int frame = (int)(time * 1000 / tile.animation_frame_length_ms) % tile.animation_frame_count;
int frame = 0;
if (time > 0.0)
frame = (int)(time * 1000 / tile.animation_frame_length_ms) % tile.animation_frame_count;
// If frame doesn't change, skip
if (frame == it->second.frame)