X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameDraw.cpp;fp=Source%2FGameDraw.cpp;h=7b195dfdcc6cc20d059c532e91fb1205baedae7f;hb=cf610b0dfbf15ffafaefcae72a44957095fd7740;hp=d14a07744e3760f888b11d9e4d3d0a710ccb463d;hpb=51a0860281c8978f5404c730eb809fb455d99aea;p=lugaru.git diff --git a/Source/GameDraw.cpp b/Source/GameDraw.cpp index d14a077..7b195df 100644 --- a/Source/GameDraw.cpp +++ b/Source/GameDraw.cpp @@ -119,8 +119,6 @@ int Game::DrawGLScene(StereoSide side) static float tempmult; float tutorialopac; std::string string; - std::string string2; - std::string string3; static int drawmode = 0; if ( stereomode == stereoAnaglyph ) { @@ -137,7 +135,8 @@ int Game::DrawGLScene(StereoSide side) } else { glColorMask( 1.0, 1.0, 1.0, 1.0 ); - if ( stereomode == stereoHorizontalInterlaced || stereomode == stereoVerticalInterlaced ) { + if ( stereomode == stereoHorizontalInterlaced || + stereomode == stereoVerticalInterlaced ) { glStencilFunc(side == stereoLeft ? GL_NOTEQUAL : GL_EQUAL, 0x01, 0x01); } } @@ -583,10 +582,9 @@ int Game::DrawGLScene(StereoSide side) //Hot spots if (Hotspot::hotspots.size() && (bonustime >= 1 || bonus <= 0 || bonustime < 0) && !Tutorial::active) { float closestdist = -1; - float distance = 0; int closest = Hotspot::current; for (unsigned i = 0; i < Hotspot::hotspots.size(); i++) { - distance = distsq(&Person::players[0]->coords, &Hotspot::hotspots[i].position); + float distance = distsq(&Person::players[0]->coords, &Hotspot::hotspots[i].position); if (closestdist == -1 || distance < closestdist) { if (distsq(&Person::players[0]->coords, &Hotspot::hotspots[i].position) < Hotspot::hotspots[i].size && ((Hotspot::hotspots[i].type <= 10 && Hotspot::hotspots[i].type >= 0) || (Hotspot::hotspots[i].type <= 40 && Hotspot::hotspots[i].type >= 20))) { closestdist = distance;