X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=b1f3ecc93e9496b582877b3b2a37a4c2fe81fc79;hb=710fa624080c2f2db7923832e2fd9945f4dd8254;hp=36452aa4f5e09f5c6de70fdc6ef92e8ee51199d1;hpb=543c91ec63286f0fa263f0b19f242b514e7fc8bf;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 36452aa..b1f3ecc 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -1415,7 +1415,6 @@ void Game::Loadlevel(int which){ } void Game::Loadlevel(const char *name){ - cout << "loading level " << name << "…" << endl; int templength; float lamefloat; static const char *pfx = ":Data:Maps:"; @@ -5740,15 +5739,10 @@ void Game::MenuTick(){ c=campaigns.begin(); accountactive->setCurrentCampaign(*c); } - LoadCampaign(); if(Mainmenuitems[7]) - glDeleteTextures(1,&Mainmenuitems[7]); - ifstream test(ConvertFileName((":Data:Textures:"+accountactive->getCurrentCampaign()+":World.png").c_str())); - if(test.good()) { - LoadTexture((":Data:Textures:"+accountactive->getCurrentCampaign()+":World.png").c_str(),&Mainmenuitems[7],0,0); - } else { - LoadTexture(":Data:Textures:World.png",&Mainmenuitems[7],0,0); - } + glDeleteTextures(1,&Mainmenuitems[7]); // we delete the world texture so load campaign will reload it + Mainmenuitems[7] = 0; + LoadCampaign(); break; } break;