X-Git-Url: https://git.jsancho.org/?a=blobdiff_plain;f=Source%2FGameTick.cpp;h=4a0229bb673bc2c2a89ff0c14de8c5a16d290771;hb=38d21f685e669429419970d4bb7e7c806592e131;hp=540360584dcbaff63076a55f75db09122a19911f;hpb=87ff660bf58766ab705a749e72e04154ccf5a737;p=lugaru.git diff --git a/Source/GameTick.cpp b/Source/GameTick.cpp index 5403605..4a0229b 100644 --- a/Source/GameTick.cpp +++ b/Source/GameTick.cpp @@ -1311,11 +1311,11 @@ static void cmd_dispatch(const string cmd) /********************> Tick() <*****/ extern bool save_image(const char * fname); -void Screenshot (void) +void Screenshot (void) { char temp[1024]; - time_t t = time(NULL); - struct tm *tme = localtime(&t); + time_t t = time(NULL); + struct tm *tme = localtime(&t); sprintf(temp, "Screenshots/Screenshot_%04d_%02d_%02d--%02d_%02d_%02d.png", tme->tm_year + 1900, tme->tm_mon + 1, tme->tm_mday, tme->tm_hour, tme->tm_min, tme->tm_sec); #if defined(_WIN32) @@ -1509,7 +1509,7 @@ void Setenvironment(int which) temptexdetail = texdetail; if (texdetail > 1) texdetail = 4; - skybox->load( ":Data:Textures:Skybox(snow):Front.jpg", + skybox->load( ":Data:Textures:Skybox(snow):Front.jpg", ":Data:Textures:Skybox(snow):Left.jpg", ":Data:Textures:Skybox(snow):Back.jpg", ":Data:Textures:Skybox(snow):Right.jpg", @@ -1547,7 +1547,7 @@ void Setenvironment(int which) temptexdetail = texdetail; if (texdetail > 1) texdetail = 4; - skybox->load( ":Data:Textures:Skybox(sand):Front.jpg", + skybox->load( ":Data:Textures:Skybox(sand):Front.jpg", ":Data:Textures:Skybox(sand):Left.jpg", ":Data:Textures:Skybox(sand):Back.jpg", ":Data:Textures:Skybox(sand):Right.jpg", @@ -1584,7 +1584,7 @@ void Setenvironment(int which) temptexdetail = texdetail; if (texdetail > 1) texdetail = 4; - skybox->load( ":Data:Textures:Skybox(grass):Front.jpg", + skybox->load( ":Data:Textures:Skybox(grass):Front.jpg", ":Data:Textures:Skybox(grass):Left.jpg", ":Data:Textures:Skybox(grass):Back.jpg", ":Data:Textures:Skybox(grass):Right.jpg", @@ -8507,33 +8507,33 @@ void Game::TickOnceAfter() /* //what did autocam do? if(player[0].skeleton.free!=2&&autocam){ - cameraspeed=20; - if(findLengthfast(&player[0].velocity)>400){ - cameraspeed=20+(findLength(&player[0].velocity)-20)*.96; - } - if(player[0].skeleton.free==0&&player[0].animTarget!=hanganim&&player[0].animTarget!=climbanim)target.y+=1.4; - cameradist+=multiplier*5; - if(cameradist>3.3)cameradist=3.3; - coltarget=target-cameraloc; - if(findLengthfast(&coltarget)1) - { - Normalise(&coltarget); - if(player[0].animTarget!=hanganim&&player[0].animTarget!=climbanim&&player[0].animCurrent!=climbanim&&player[0].currentoffset.x==0)cameraloc=cameraloc+coltarget*multiplier*cameraspeed; - else cameraloc=cameraloc+coltarget*multiplier*8; - } - if(editorenabled)cameraloc=target; - viewer=cameraloc; - colviewer=viewer; - coltarget=cameraloc; - objects.SphereCheckPossible(&colviewer, findDistance(&colviewer,&coltarget)); - if(terrain.patchobjectnum[player[0].whichpatchx][player[0].whichpatchz]) - for(int j=0;j400){ + cameraspeed=20+(findLength(&player[0].velocity)-20)*.96; + } + if(player[0].skeleton.free==0&&player[0].animTarget!=hanganim&&player[0].animTarget!=climbanim)target.y+=1.4; + cameradist+=multiplier*5; + if(cameradist>3.3)cameradist=3.3; + coltarget=target-cameraloc; + if(findLengthfast(&coltarget)1) + { + Normalise(&coltarget); + if(player[0].animTarget!=hanganim&&player[0].animTarget!=climbanim&&player[0].animCurrent!=climbanim&&player[0].currentoffset.x==0)cameraloc=cameraloc+coltarget*multiplier*cameraspeed; + else cameraloc=cameraloc+coltarget*multiplier*8; + } + if(editorenabled)cameraloc=target; + viewer=cameraloc; + colviewer=viewer; + coltarget=cameraloc; + objects.SphereCheckPossible(&colviewer, findDistance(&colviewer,&coltarget)); + if(terrain.patchobjectnum[player[0].whichpatchx][player[0].whichpatchz]) + for(int j=0;j