X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FObjects.cpp;h=a01fc1193598d379c0cc390c5fc7d7d53372ffec;hb=8afdcba610cded0e54b85069ba051268b29669a6;hp=d67044eee0923ea543436805384068352c0cf457;hpb=44146d06c780d3aaa283672fedb08b8870ebe1b9;p=lugaru.git diff --git a/Source/Objects.cpp b/Source/Objects.cpp index d67044e..a01fc11 100644 --- a/Source/Objects.cpp +++ b/Source/Objects.cpp @@ -31,14 +31,12 @@ extern float multiplier; extern float gravity; extern FRUSTUM frustum; extern Terrain terrain; -extern float terraindetail; extern bool foliage; extern int detail; extern float blurness; extern float windvar; extern float playerdist; extern bool skyboxtexture; -extern Sprites sprites; //Functions @@ -68,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) @@ -664,7 +662,7 @@ void Objects::DoStuff() XYZ spawnpoint; for(int i=0;i=0&&patchz>=0&&patchx