]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Weapons.cpp
Remove terraindetail (== 1 anyway)
[lugaru.git] / Source / Weapons.cpp
index 9be2636232ed6f74e8fe37f3a7854ebe7d6f9956..d250f1ee84676c50d008dbc35e4724ce22db42ac 100644 (file)
@@ -28,7 +28,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "Awards.h"
 
 extern float multiplier;
-extern int channels[100];
 extern Terrain terrain;
 extern float gravity;
 extern int environment;
@@ -47,7 +46,6 @@ extern bool osx;
 extern bool autoslomo;
 extern float camerashake;
 extern float woozy;
-extern float terraindetail;
 extern float viewdistance;
 extern float blackout;
 extern int difficulty;
@@ -119,8 +117,8 @@ void        Weapons::DoStuff(){
                if(owner[i]==-1&&(velocity[i].x||velocity[i].y||velocity[i].z)&&!physics[i]){
                        position[i]+=velocity[i]*multiplier;
                        tippoint[i]+=velocity[i]*multiplier;
-                       whichpatchx=position[i].x/(terrain.size/subdivision*terrain.scale*terraindetail);
-                       whichpatchz=position[i].z/(terrain.size/subdivision*terrain.scale*terraindetail);
+                       whichpatchx=position[i].x/(terrain.size/subdivision*terrain.scale);
+                       whichpatchz=position[i].z/(terrain.size/subdivision*terrain.scale);
                        if(whichpatchx>0&&whichpatchz>0&&whichpatchx<subdivision&&whichpatchz<subdivision)
                                if(terrain.patchobjectnum[whichpatchx][whichpatchz]){
                                        for(j=0;j<terrain.patchobjectnum[whichpatchx][whichpatchz];j++){
@@ -356,8 +354,8 @@ void        Weapons::DoStuff(){
 
 
                                //Object collisions
-                               whichpatchx=(position[i].x)/(terrain.size/subdivision*terrain.scale*terraindetail);
-                               whichpatchz=(position[i].z)/(terrain.size/subdivision*terrain.scale*terraindetail);
+                               whichpatchx=(position[i].x)/(terrain.size/subdivision*terrain.scale);
+                               whichpatchz=(position[i].z)/(terrain.size/subdivision*terrain.scale);
                                if(whichpatchx>0&&whichpatchz>0&&whichpatchx<subdivision&&whichpatchz<subdivision)
                                        if(terrain.patchobjectnum[whichpatchx][whichpatchz]){
                                                for(j=0;j<terrain.patchobjectnum[whichpatchx][whichpatchz];j++){