]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameDraw.cpp
Removed useless code
[lugaru.git] / Source / GameDraw.cpp
index 802a1e99934c43fdb97f86abe67175e121a2ca13..578e6f3f54c72aa6b8d717be26a9c925ef96396f 100644 (file)
@@ -107,13 +107,13 @@ enum drawmodes {
     realmotionblurmode, doublevisionmode, glowmode,
 };
 
-void Game::flash()   // shouldn't be that way, these should be attributes and Person class should not change rendering.
+void Game::flash(float amount, int delay)   // shouldn't be that way, these should be attributes and Person class should not change rendering.
 {
     flashr = 1;
     flashg = 0;
     flashb = 0;
-    flashamount = 1;
-    flashdelay = 1;
+    flashamount = amount;
+    flashdelay = delay;
 }
 
 void DrawMenu();
@@ -890,8 +890,8 @@ int Game::DrawGLScene(StereoSide side)
                 text->glPrint(screenwidth / 2 - 7.6 * strlen(string2)*screenwidth / 1024 * .8, 0 + screenheight * 1 / 10 - 20 * .8 * screenwidth / 1024, string2, 1, 1.5 * screenwidth / 1024 * .8, screenwidth, screenheight);
                 text->glPrint(screenwidth / 2 - 7.6 * strlen(string3)*screenwidth / 1024 * .8, 0 + screenheight * 1 / 10 - 40 * .8 * screenwidth / 1024, string3, 1, 1.5 * screenwidth / 1024 * .8, screenwidth, screenheight);
             }
-            //Hot spots
 
+            //Hot spots
             if (numhotspots && (bonustime >= 1 || bonus <= 0 || bonustime < 0) && !tutoriallevel) {
                 float closestdist = -1;
                 float distance = 0;
@@ -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);