]> git.jsancho.org Git - lugaru.git/blobdiff - Source/GameInitDispose.cpp
Removed useless code in GameInitDispose
[lugaru.git] / Source / GameInitDispose.cpp
index 38815d9ee56206ef427bde0020460026dcae30da..73673ee9678e0c7cb11ebb194ed19b0d8784343c 100644 (file)
@@ -114,17 +114,6 @@ void Game::deleteGame()
         delete skybox;
     if (text)
         delete text;
-    terraintexture.destroy();
-    terraintexture2.destroy();
-    cursortexture.destroy();
-    Maparrowtexture.destroy();
-    Mapboxtexture.destroy();
-    Mapcircletexture.destroy();
-    hawktexture.destroy();
-    loadscreentexture.destroy();
-
-    for (int i = 0; i < 10; i++)
-        Mainmenuitems[i].destroy();
 
     glDeleteTextures(1, &screentexture);
     glDeleteTextures(1, &screentexture2);
@@ -185,6 +174,10 @@ GLvoid Game::ReSizeGLScene(float fov, float pnear)
 
 void Game::LoadingScreen()
 {
+    if (!visibleloading) {
+        return;
+    }
+
     static float loadprogress;
     static AbsoluteTime frametime = {0, 0};
     AbsoluteTime currTime = UpTime ();
@@ -663,13 +656,9 @@ void Game::LoadStuff()
 
     stillloading = 1;
 
-    for (auto p:Person::players) {
-        p->skeleton.drawmodel.textureptr.destroy();
-    }
-
-    visibleloading = 0; //don't use loadscreentexture yet
+    visibleloading = false; //don't use loadscreentexture yet
     loadscreentexture.load("Textures/Fire.jpg", 1);
-    visibleloading = 1;
+    visibleloading = true;
 
     temptexdetail = texdetail;
     texdetail = 1;
@@ -868,11 +857,6 @@ void Game::LoadStuff()
         }
     }
 
-    LoadingScreen();
-    temptexdetail = texdetail;
-    texdetail = 1;
-    texdetail = temptexdetail;
-
     LoadingScreen();
 
     if (!screentexture) {
@@ -887,6 +871,6 @@ void Game::LoadStuff()
     loading = 0;
     changedelay = 1;
 
-    visibleloading = 0;
+    visibleloading = false;
 }