summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Bosveld <joel@joel-desktop.(none)>2008-01-25 12:45:25 +0900
committerJoel Bosveld <joel@joel-desktop.(none)>2008-01-25 12:45:25 +0900
commit4b5d524dfaa44b34f8c35ba2a5be2b5361a0a41f (patch)
tree039aa5bb6fe5672556a673921fb9de5dc0326f0e
parentdd77fe08dc2e733fc101a6e67026a75626355513 (diff)
downloadcubedbus-4b5d524dfaa44b34f8c35ba2a5be2b5361a0a41f.tar.gz
cubedbus-4b5d524dfaa44b34f8c35ba2a5be2b5361a0a41f.tar.bz2
Fix for rotation
-rw-r--r--cubedbusModel.c.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/cubedbusModel.c.in b/cubedbusModel.c.in
index a5c6147..4f6f6c5 100644
--- a/cubedbusModel.c.in
+++ b/cubedbusModel.c.in
@@ -227,6 +227,7 @@ cubedbusAddModelObject (CubedbusObject *obj, CompOption *option, int nOption)
int mtlCount;
char *tmpName;
+ if(nMtllib != 0)
for(mtlCount=0;mtllib[mtlCount] != NULL;mtlCount++)
{
fp=fopen((tmpName=findPath( getStringOptionNamed(option, nOption, "file", ""), mtllib[mtlCount])) , "r");
@@ -558,8 +559,8 @@ cubedbusDrawModelObject (CubedbusObject *obj)
glCallList(data->dList);
data->rotate[0]+=data->rotateSpeed;
- if(data->rotate[0]>360) data->rotate[0]=0;
- if(data->rotate[0]<0) data->rotate[0]=360;
+ if(data->rotate[0]>360) data->rotate[0]-=360;
+ if(data->rotate[0]<0) data->rotate[0]+=360;
glDisable (GL_LIGHTING);