X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=86f840f4c574ae10dbb809363e6fee2e0cdd8661;hb=fdee267b8dccf98a851e01c592bf80ce26e2d364;hp=36452aa4f5e09f5c6de70fdc6ef92e8ee51199d1;hpb=543c91ec63286f0fa263f0b19f242b514e7fc8bf;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 36452aa..86f840f 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -5740,15 +5740,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;