diff --git a/source/src/main.cpp b/source/src/main.cpp index e5be87d1..ae30135c 100644 --- a/source/src/main.cpp +++ b/source/src/main.cpp @@ -476,12 +476,6 @@ void mapshot() bool needsautoscreenshot = false; -void makeautoscreenshot() -{ - needsautoscreenshot = false; - screenshot(NULL); -} - COMMAND(screenshot, "s"); COMMAND(mapshot, ""); COMMAND(quit, ""); @@ -1263,7 +1257,12 @@ int main(int argc, char **argv) if(lastmillis) updateworld(curtime, lastmillis); - if(needsautoscreenshot) showscores(true); + if(needsautoscreenshot) + { + showscores(true); + addsleep(0, "screenshot"); + needsautoscreenshot = false; + } serverslice(0); @@ -1279,8 +1278,6 @@ int main(int argc, char **argv) if(frames>4) SDL_GL_SwapBuffers(); } - if(needsautoscreenshot) makeautoscreenshot(); - #ifdef _DEBUG if(millis>lastflush+60000) { fflush(stdout); lastflush = millis; } #endif