X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FObjects.cpp;h=a01fc1193598d379c0cc390c5fc7d7d53372ffec;hb=bbf8873b80baf3cb468ac12b3f62b0938320fef1;hp=3317992d97d8553b00fffbe3f2999a2450bdd048;hpb=8265984dce72d262e3865ebad4668d98b5b26d4a;p=lugaru.git diff --git a/Source/Objects.cpp b/Source/Objects.cpp index 3317992..a01fc11 100644 --- a/Source/Objects.cpp +++ b/Source/Objects.cpp @@ -31,7 +31,6 @@ extern float multiplier; extern float gravity; extern FRUSTUM frustum; extern Terrain terrain; -extern float terraindetail; extern bool foliage; extern int detail; extern float blurness; @@ -67,8 +66,8 @@ void Objects::SphereCheckPossible(XYZ *p1,float radius) static int whichpatchx; static int whichpatchz; - whichpatchx=p1->x/(terrain.size/subdivision*terrain.scale*terraindetail); - whichpatchz=p1->z/(terrain.size/subdivision*terrain.scale*terraindetail); + whichpatchx=p1->x/(terrain.size/subdivision*terrain.scale); + whichpatchz=p1->z/(terrain.size/subdivision*terrain.scale); if(whichpatchx>=0&&whichpatchz>=0&&whichpatchx0&&terrain.patchobjectnum[whichpatchx][whichpatchz]<500) @@ -713,8 +712,8 @@ void Objects::DoShadows() terrainpoint=position[i]+DoRotation(model[i].vertex[j]+model[i].normals[j]*.1,0,rotation[i],0); //terrainpoint.y+=model[i].boundingsphereradius; shadowed[i]=0; - patchx=terrainpoint.x/(terrain.size/subdivision*terrain.scale*terraindetail); - patchz=terrainpoint.z/(terrain.size/subdivision*terrain.scale*terraindetail); + patchx=terrainpoint.x/(terrain.size/subdivision*terrain.scale); + patchz=terrainpoint.z/(terrain.size/subdivision*terrain.scale); if(patchx>=0&&patchz>=0&&patchx