X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FObjects.cpp;h=353fa6e31f74b8d88215b2aa40928466b447bd74;hb=9e06cb73424ca3f0eb971350c5dfb3cdaec0d5bf;hp=a01fc1193598d379c0cc390c5fc7d7d53372ffec;hpb=cfdbe0ad0521045b27a60dbb1c963ea6dfdcda5a;p=lugaru.git diff --git a/Source/Objects.cpp b/Source/Objects.cpp index a01fc11..353fa6e 100644 --- a/Source/Objects.cpp +++ b/Source/Objects.cpp @@ -22,7 +22,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Objects.h" extern XYZ viewer; extern float viewdistance; -extern float lightambient[3],lightbrightness[3]; extern float fadestart; extern int environment; extern float texscale; @@ -53,7 +52,7 @@ bool Objects::checkcollide(XYZ startpoint,XYZ endpoint,int which){ if(type[i]!=treeleavestype&&type[i]!=treetrunktype&&type[i]!=bushtype&&type[i]!=firetype&&i!=which){ colviewer=startpoint; coltarget=endpoint; - if(model[i].LineCheck(&colviewer,&coltarget,&colpoint,&position[i],&rotation[i])!=-1)return 1; + if(model[i].LineCheck(&colviewer,&coltarget,&colpoint,&position[i],&yaw[i])!=-1)return 1; } } @@ -74,7 +73,7 @@ void Objects::SphereCheckPossible(XYZ *p1,float radius) for(j=0;j1)distance=1; if(distance>0){ - /*if(checkcollide(viewer,DoRotation(model[i].vertex[model[i].vertexNum],0,rotation[i],0)*scale[i]+position[i],i)){ + /*if(checkcollide(viewer,DoRotation(model[i].vertex[model[i].vertexNum],0,yaw[i],0)*scale[i]+position[i],i)){ occluded[i]+=1; } else occluded[i]=0;*/ @@ -255,7 +254,7 @@ void Objects::Draw() glRotatef((sin(windvar+position[i].x*.3)+.5)*4*.5*(sin(windvar*2+position[i].x*.3)+1)/2,1,0,0); } } - glRotatef(rotation[i],0,1,0); + glRotatef(yaw[i],0,1,0); if(distance>1)distance=1; glColor4f((1-shadowed[i])/2+.5,(1-shadowed[i])/2+.5,(1-shadowed[i])/2+.5,distance); if(distance>=1){ @@ -328,7 +327,7 @@ void Objects::Draw() glTexEnvf( GL_TEXTURE_FILTER_CONTROL_EXT, GL_TEXTURE_LOD_BIAS_EXT, 0 ); for(i=0;i