diff --git a/license.txt b/license.txt index a59a9f13b..24b0564f7 100644 --- a/license.txt +++ b/license.txt @@ -1,4 +1,4 @@ -Copyright (C) 2007-2011 Magnus Auvinen +Copyright (C) 2007-2012 Magnus Auvinen This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -25,4 +25,4 @@ check the individual libraries. ------------------------------------------------------------------------ With that being said, contact us if there is anything you want to do -that the license does not premit. +that the license does not permit. diff --git a/readme.txt b/readme.txt index 77de29888..51d5696d1 100644 --- a/readme.txt +++ b/readme.txt @@ -6,7 +6,7 @@ Please visit http://www.DDRace.info for up-to-date information about DDRace, including new versions, custom maps and much more. Teeworlds README is as follows: -Copyright (c) 2011 Magnus Auvinen +Copyright (c) 2012 Magnus Auvinen This software is provided 'as-is', without any express or implied diff --git a/src/engine/client/backend_sdl.cpp b/src/engine/client/backend_sdl.cpp index 691d193ca..3f74f87e0 100644 --- a/src/engine/client/backend_sdl.cpp +++ b/src/engine/client/backend_sdl.cpp @@ -290,6 +290,9 @@ void CCommandProcessorFragment_SDL::Cmd_Shutdown(const SCommand_Shutdown *pComma void CCommandProcessorFragment_SDL::Cmd_Swap(const CCommandBuffer::SCommand_Swap *pCommand) { GL_SwapBuffers(m_GLContext); + + if(pCommand->m_Finish) + glFinish(); } void CCommandProcessorFragment_SDL::Cmd_VideoModes(const CCommandBuffer::SCommand_VideoModes *pCommand) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index 61897578b..533597f4e 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -1760,7 +1760,7 @@ void CClient::Run() MasterServer()->RefreshAddresses(m_NetClient.NetType()); // init the editor - //m_pEditor->Init(); + m_pEditor->Init(); // load data @@ -1862,22 +1862,16 @@ void CClient::Run() */ // render - if(g_Config.m_ClEditor) { - if(!m_EditorActive) + if(g_Config.m_ClEditor) { - GameClient()->OnActivateEditor(); - m_EditorActive = true; + if(!m_EditorActive) + { + GameClient()->OnActivateEditor(); + m_EditorActive = true; + } } - - Update(); - m_pEditor->UpdateAndRender(); - DebugRender(); - m_pGraphics->Swap(); - } - else - { - if(m_EditorActive) + else if(m_EditorActive) m_EditorActive = false; Update(); @@ -1901,18 +1895,27 @@ void CClient::Run() { if((m_RenderFrames%10) == 0) { - Render(); + if(!m_EditorActive) + Render(); + else + { + m_pEditor->UpdateAndRender(); + DebugRender(); + } m_pGraphics->Swap(); } } else { - Render(); + if(!m_EditorActive) + Render(); + else + { + m_pEditor->UpdateAndRender(); + DebugRender(); + } m_pGraphics->Swap(); } - - - } } diff --git a/src/engine/client/graphics_threaded.cpp b/src/engine/client/graphics_threaded.cpp index 33670f7bd..c6947e332 100644 --- a/src/engine/client/graphics_threaded.cpp +++ b/src/engine/client/graphics_threaded.cpp @@ -837,6 +837,7 @@ void CGraphics_Threaded::Swap() // add swap command CCommandBuffer::SCommand_Swap Cmd; + Cmd.m_Finish = g_Config.m_GfxFinish; m_pCommandBuffer->AddCommand(Cmd); // kick the command buffer diff --git a/src/engine/client/graphics_threaded.h b/src/engine/client/graphics_threaded.h index 51148f0f2..f4f17ec26 100644 --- a/src/engine/client/graphics_threaded.h +++ b/src/engine/client/graphics_threaded.h @@ -199,6 +199,8 @@ public: struct SCommand_Swap : public SCommand { SCommand_Swap() : SCommand(CMD_SWAP) {} + + int m_Finish; }; struct SCommand_Texture_Create : public SCommand