X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=4aead8d5b959ea169e0828e75fc82e2e23af1d1f;hb=ab6914764793b00eb6be0e3a939517636e4b5c3a;hp=d5ddeb41c1145626da341555137d53462c034cec;hpb=3223ab7ee58bf4c1c35d86e47946f93a9b17eb97;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index d5ddeb4..4aead8d 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -27,6 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #endif +#include #include #include "Game.h" #include "openal_wrapper.h" @@ -495,7 +496,7 @@ static void ch_size(Game *game, const char *args) static int find_closest() { int closest = 0; - float closestdist = 1.0/0.0; + float closestdist = std::numeric_limits::max(); for (int i = 1; i < numplayers; i++) { float distance; @@ -1405,14 +1406,14 @@ void Game::Loadlevel(int which){ stealthloading=0; whichlevel=which; - if (which == -1) { + if(which == -1){ tutoriallevel = -1; Loadlevel("tutorial"); - } else if (which >= 0 && which <= 15) { + }else if(which >= 0 && which <= 15){ char buf[32]; snprintf(buf, 32, "map%d", which + 1); Loadlevel(buf); - } else + }else Loadlevel("mapsave"); }