summaryrefslogtreecommitdiff
path: root/cubedbusModel.c.in
diff options
context:
space:
mode:
Diffstat (limited to 'cubedbusModel.c.in')
-rw-r--r--cubedbusModel.c.in3
1 files changed, 3 insertions, 0 deletions
diff --git a/cubedbusModel.c.in b/cubedbusModel.c.in
index 83b13e5..acb217e 100644
--- a/cubedbusModel.c.in
+++ b/cubedbusModel.c.in
@@ -1216,6 +1216,9 @@ cubedbusDrawModelObject (CubedbusObject *obj)
{
float t = fmodf(data->fps*timeSec, (float) data->fileCounter);
+ if (t<0)
+ t+= (float) data->fileCounter;
+
int ti = (int) t;
int ti2= (ti+1)%(data->fileCounter);
float dt = t-ti;