From 54d4d949e491f846d896b6e66c3b77e14da74ff6 Mon Sep 17 00:00:00 2001 From: Lucas GAUTHERON Date: Thu, 27 Dec 2012 10:39:48 +0000 Subject: [PATCH] autoscreenshot fix git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6998 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/main.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) 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