]> git.jsancho.org Git - lugaru.git/commitdiff
Removed useless code
authorCôme Chilliet <come@chilliet.eu>
Tue, 29 Nov 2016 09:26:21 +0000 (16:26 +0700)
committerCôme Chilliet <come@chilliet.eu>
Tue, 29 Nov 2016 09:26:21 +0000 (16:26 +0700)
Source/GameDraw.cpp

index 4994b1184b92c6b72763d7c694660bba05fe65d0..578e6f3f54c72aa6b8d717be26a9c925ef96396f 100644 (file)
@@ -1434,45 +1434,9 @@ int Game::DrawGLScene(StereoSide side)
             XYZ center;
             float radius;
             float distcheck;
-            int numliveplayers = 0;
-            center = 0;
-            for (unsigned i = 0; i < Person::players.size(); i++) {
-                if (!Person::players[i]->dead)
-                    numliveplayers++;
-            }
-
-            int numadd = 0;
-
-            for (int i = 0; i < objects.numobjects; i++) {
-                if (objects.type[i] == treetrunktype || objects.type[i] == boxtype) {
-                    center += objects.position[i];
-                    numadd++;
-                }
-            }
-            for (unsigned i = 0; i < Person::players.size(); i++) {
-                if (!Person::players[i]->dead)
-                    center += Person::players[i]->coords;
-            }
-            center /= numadd + numliveplayers;
 
             center = Person::players[0]->coords;
 
-            float maxdistance = 0;
-            float tempdist;
-            for (int i = 0; i < objects.numobjects; i++) {
-                tempdist = distsq(&center, &objects.position[i]);
-                if (tempdist > maxdistance) {
-                    maxdistance = tempdist;
-                }
-            }
-            for (unsigned i = 0; i < Person::players.size(); i++) {
-                if (!Person::players[i]->dead) {
-                    tempdist = distsq(&center, &Person::players[i]->coords);
-                    if (tempdist > maxdistance) {
-                        maxdistance = tempdist;
-                    }
-                }
-            }
             radius = 110;
 
             glScalef(.25 / radius * 256 * terrain.scale * .4, .25 / radius * 256 * terrain.scale * .4, 1);