]> git.jsancho.org Git - lugaru.git/blobdiff - Source/Sprite.cpp
merge
[lugaru.git] / Source / Sprite.cpp
index f0991afc4be6fbf73b15af2fb52d77b8ff95c457..0998e093bfc65eb35f85c1f6740cc9d334e9ac31 100644 (file)
@@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "Sprite.h"
 #include "Person.h"
+#include "Game.h"
 extern XYZ viewer;
 extern float viewdistance;
 extern float fadestart;
@@ -33,11 +34,8 @@ extern Terrain terrain;
 extern Objects objects;
 extern int detail;
 extern XYZ viewerfacing;
-extern float terraindetail;
 extern int bloodtoggle;
 extern XYZ windvector;
-extern int numplayers;
-extern Person player[maxplayers];
 
 // init statics
 GLuint Sprite::cloudtexture = 0;
@@ -330,8 +328,8 @@ void Sprite::Draw()
                                        }
                                }
 
-                               whichpatchx=sprites[i]->position.x/(terrain.size/subdivision*terrain.scale*terraindetail);
-                               whichpatchz=sprites[i]->position.z/(terrain.size/subdivision*terrain.scale*terraindetail);
+                               whichpatchx=sprites[i]->position.x/(terrain.size/subdivision*terrain.scale);
+                               whichpatchz=sprites[i]->position.z/(terrain.size/subdivision*terrain.scale);
                                if(whichpatchx>0&&whichpatchz>0&&whichpatchx<subdivision&&whichpatchz<subdivision)
                                        if(terrain.patchobjectnum[whichpatchx][whichpatchz]){
                                                if(!spritehit)