From 48d21b61a2a1b32ba0e39b411311947693ecea47 Mon Sep 17 00:00:00 2001 From: SushiTee Date: Wed, 9 Nov 2011 16:06:17 +0100 Subject: [PATCH 01/10] fixed links between tile layer color envelopes when deleting envelopes --- src/game/editor/editor.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index fe6e963c2..75f9476c6 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -3798,6 +3798,14 @@ void CEditorMap::DeleteEnvelope(int Index) Layer->m_lQuads[k].m_ColorEnv--; } } + else if(m_lGroups[i]->m_lLayers[j]->m_Type == LAYERTYPE_TILES) + { + CLayerTiles *Layer = static_cast(m_lGroups[i]->m_lLayers[j]); + if(Layer->m_ColorEnv == Index) + Layer->m_ColorEnv = -1; + if(Layer->m_ColorEnv > Index) + Layer->m_ColorEnv--; + } m_lEnvelopes.remove_index(Index); } From c22b6c4b4f75578525cafda557ed1344bec6eec8 Mon Sep 17 00:00:00 2001 From: SushiTee Date: Sat, 26 Nov 2011 01:44:24 +0100 Subject: [PATCH 02/10] fixed selecting of quad points --- src/game/editor/editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 75f9476c6..6fc88943f 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -1364,6 +1364,7 @@ void CEditor::DoQuadPoint(CQuad *pQuad, int QuadIndex, int V) m_SelectedPoints |= 1< Date: Tue, 29 Nov 2011 22:15:27 +0100 Subject: [PATCH 03/10] renamed a variable --- src/game/editor/editor.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/game/editor/editor.cpp b/src/game/editor/editor.cpp index 6fc88943f..4f4096a9e 100644 --- a/src/game/editor/editor.cpp +++ b/src/game/editor/editor.cpp @@ -3786,26 +3786,26 @@ void CEditorMap::DeleteEnvelope(int Index) for(int j = 0; j < m_lGroups[i]->m_lLayers.size(); ++j) if(m_lGroups[i]->m_lLayers[j]->m_Type == LAYERTYPE_QUADS) { - CLayerQuads *Layer = static_cast(m_lGroups[i]->m_lLayers[j]); - for(int k = 0; k < Layer->m_lQuads.size(); ++k) + CLayerQuads *pLayer = static_cast(m_lGroups[i]->m_lLayers[j]); + for(int k = 0; k < pLayer->m_lQuads.size(); ++k) { - if(Layer->m_lQuads[k].m_PosEnv == Index) - Layer->m_lQuads[k].m_PosEnv = -1; - else if(Layer->m_lQuads[k].m_PosEnv > Index) - Layer->m_lQuads[k].m_PosEnv--; - if(Layer->m_lQuads[k].m_ColorEnv == Index) - Layer->m_lQuads[k].m_ColorEnv = -1; - else if(Layer->m_lQuads[k].m_ColorEnv > Index) - Layer->m_lQuads[k].m_ColorEnv--; + if(pLayer->m_lQuads[k].m_PosEnv == Index) + pLayer->m_lQuads[k].m_PosEnv = -1; + else if(pLayer->m_lQuads[k].m_PosEnv > Index) + pLayer->m_lQuads[k].m_PosEnv--; + if(pLayer->m_lQuads[k].m_ColorEnv == Index) + pLayer->m_lQuads[k].m_ColorEnv = -1; + else if(pLayer->m_lQuads[k].m_ColorEnv > Index) + pLayer->m_lQuads[k].m_ColorEnv--; } } else if(m_lGroups[i]->m_lLayers[j]->m_Type == LAYERTYPE_TILES) { - CLayerTiles *Layer = static_cast(m_lGroups[i]->m_lLayers[j]); - if(Layer->m_ColorEnv == Index) - Layer->m_ColorEnv = -1; - if(Layer->m_ColorEnv > Index) - Layer->m_ColorEnv--; + CLayerTiles *pLayer = static_cast(m_lGroups[i]->m_lLayers[j]); + if(pLayer->m_ColorEnv == Index) + pLayer->m_ColorEnv = -1; + if(pLayer->m_ColorEnv > Index) + pLayer->m_ColorEnv--; } m_lEnvelopes.remove_index(Index); From 1452b6811cb2d4a547d941d8c8aaaf56b50e9ec6 Mon Sep 17 00:00:00 2001 From: eeeee Date: Thu, 3 Nov 2011 07:17:04 +0400 Subject: [PATCH 04/10] Replaced sorting implementation with stable one to prevent annoying flickering on server browser update. --- src/engine/client/serverbrowser.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/engine/client/serverbrowser.cpp b/src/engine/client/serverbrowser.cpp index ddfc75972..0ffc03e82 100644 --- a/src/engine/client/serverbrowser.cpp +++ b/src/engine/client/serverbrowser.cpp @@ -283,16 +283,16 @@ void CServerBrowser::Sort() // sort if(g_Config.m_BrSort == IServerBrowser::SORT_NAME) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareName)); + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareName)); else if(g_Config.m_BrSort == IServerBrowser::SORT_PING) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortComparePing)); + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortComparePing)); else if(g_Config.m_BrSort == IServerBrowser::SORT_MAP) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareMap)); + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareMap)); else if(g_Config.m_BrSort == IServerBrowser::SORT_NUMPLAYERS) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, g_Config.m_BrFilterSpectators ? &CServerBrowser::SortCompareNumPlayers : &CServerBrowser::SortCompareNumClients)); else if(g_Config.m_BrSort == IServerBrowser::SORT_GAMETYPE) - std::sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareGametype)); + std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareGametype)); // invert the list if requested if(g_Config.m_BrSortOrder) From 8238853b8cb3b25b5b10f70f4787ae38682eb1c4 Mon Sep 17 00:00:00 2001 From: oy Date: Tue, 29 Nov 2011 22:18:40 +0100 Subject: [PATCH 05/10] added a todo note --- src/engine/client/serverbrowser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/client/serverbrowser.cpp b/src/engine/client/serverbrowser.cpp index 0ffc03e82..d60c15b8b 100644 --- a/src/engine/client/serverbrowser.cpp +++ b/src/engine/client/serverbrowser.cpp @@ -1,6 +1,6 @@ /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */ /* If you are missing that file, acquire a complete release at teeworlds.com. */ -#include // sort +#include // sort TODO: remove this #include #include From 48d367db204adb2eb0bef9764b12773891d6975f Mon Sep 17 00:00:00 2001 From: oy Date: Tue, 29 Nov 2011 22:34:47 +0100 Subject: [PATCH 06/10] added faster way of inverting the sorted serverlist by KillaBilla. Closes #885 --- src/engine/client/serverbrowser.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/engine/client/serverbrowser.cpp b/src/engine/client/serverbrowser.cpp index d60c15b8b..87964003a 100644 --- a/src/engine/client/serverbrowser.cpp +++ b/src/engine/client/serverbrowser.cpp @@ -26,7 +26,7 @@ class SortWrap CServerBrowser *m_pThis; public: SortWrap(CServerBrowser *t, SortFunc f) : m_pfnSort(f), m_pThis(t) {} - bool operator()(int a, int b) { return (m_pThis->*m_pfnSort)(a, b); } + bool operator()(int a, int b) { return (g_Config.m_BrSortOrder ? (m_pThis->*m_pfnSort)(b, a) : (m_pThis->*m_pfnSort)(a, b)); } }; CServerBrowser::CServerBrowser() @@ -294,17 +294,6 @@ void CServerBrowser::Sort() else if(g_Config.m_BrSort == IServerBrowser::SORT_GAMETYPE) std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareGametype)); - // invert the list if requested - if(g_Config.m_BrSortOrder) - { - for(i = 0; i < m_NumSortedServers/2; i++) - { - int Temp = m_pSortedServerlist[i]; - m_pSortedServerlist[i] = m_pSortedServerlist[m_NumSortedServers-i-1]; - m_pSortedServerlist[m_NumSortedServers-i-1] = Temp; - } - } - // set indexes for(i = 0; i < m_NumSortedServers; i++) m_ppServerlist[m_pSortedServerlist[i]]->m_Info.m_SortedIndex = i; From 05f77f64affc2445c7e386088e97c6411664cab3 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 30 Nov 2011 01:41:00 +0100 Subject: [PATCH 07/10] added caching for the play command. Closes #891 --- src/engine/client/client.cpp | 2 +- src/game/client/components/menus.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine/client/client.cpp b/src/engine/client/client.cpp index bec7d4d6d..9f43b9ce1 100644 --- a/src/engine/client/client.cpp +++ b/src/engine/client/client.cpp @@ -2154,7 +2154,7 @@ void CClient::RegisterCommands() m_pConsole->Register("screenshot", "", CFGFLAG_CLIENT, Con_Screenshot, this, "Take a screenshot"); m_pConsole->Register("rcon", "r", CFGFLAG_CLIENT, Con_Rcon, this, "Send specified command to rcon"); m_pConsole->Register("rcon_auth", "s", CFGFLAG_CLIENT, Con_RconAuth, this, "Authenticate to rcon"); - m_pConsole->Register("play", "r", CFGFLAG_CLIENT, Con_Play, this, "Play the file specified"); + m_pConsole->Register("play", "r", CFGFLAG_CLIENT|CFGFLAG_STORE, Con_Play, this, "Play the file specified"); m_pConsole->Register("record", "?s", CFGFLAG_CLIENT, Con_Record, this, "Record to the file"); m_pConsole->Register("stoprecord", "", CFGFLAG_CLIENT, Con_StopRecord, this, "Stop recording"); m_pConsole->Register("add_favorite", "s", CFGFLAG_CLIENT, Con_AddFavorite, this, "Add a server as a favorite"); diff --git a/src/game/client/components/menus.cpp b/src/game/client/components/menus.cpp index 8813c6679..a39139c82 100644 --- a/src/game/client/components/menus.cpp +++ b/src/game/client/components/menus.cpp @@ -35,11 +35,10 @@ vec4 CMenus::ms_GuiColor; vec4 CMenus::ms_ColorTabbarInactiveOutgame; vec4 CMenus::ms_ColorTabbarActiveOutgame; vec4 CMenus::ms_ColorTabbarInactive; -vec4 CMenus::ms_ColorTabbarActive; +vec4 CMenus::ms_ColorTabbarActive = vec4(0,0,0,0.5f); vec4 CMenus::ms_ColorTabbarInactiveIngame; vec4 CMenus::ms_ColorTabbarActiveIngame; - float CMenus::ms_ButtonHeight = 25.0f; float CMenus::ms_ListheaderHeight = 17.0f; float CMenus::ms_FontmodHeight = 0.8f; From df4e11dc8257e7e15ee5a3cf52b0d8743ccb18e7 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 30 Nov 2011 01:47:35 +0100 Subject: [PATCH 08/10] fixed fixed camera position when chatting as spectator. Closes #880 --- src/game/client/components/controls.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/client/components/controls.cpp b/src/game/client/components/controls.cpp index 81c4d5ae7..dd8564139 100644 --- a/src/game/client/components/controls.cpp +++ b/src/game/client/components/controls.cpp @@ -209,7 +209,8 @@ void CControls::OnRender() bool CControls::OnMouseMove(float x, float y) { - if(m_pClient->m_Snap.m_pGameInfoObj && m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_PAUSED) + if((m_pClient->m_Snap.m_pGameInfoObj && m_pClient->m_Snap.m_pGameInfoObj->m_GameStateFlags&GAMESTATEFLAG_PAUSED) || + (m_pClient->m_Snap.m_SpecInfo.m_Active && m_pClient->m_pChat->IsActive())) return false; m_MousePos += vec2(x, y); // TODO: ugly From c52bf5ac3a6927a7c516b35bd566f206e5f6c1f3 Mon Sep 17 00:00:00 2001 From: EliteTee Date: Sat, 5 Nov 2011 19:54:26 +0100 Subject: [PATCH 09/10] Fixed serbian translation... --- data/languages/serbian.txt | 57 +++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/data/languages/serbian.txt b/data/languages/serbian.txt index e4ec95c2a..aad71a164 100644 --- a/data/languages/serbian.txt +++ b/data/languages/serbian.txt @@ -1,20 +1,19 @@ - ##### translated strings ##### %d Bytes -== %d Bytes +== %d Bajtova %d of %d servers, %d players == %d od %d server(a), %d igrač(a) %d%% loaded -== Učitano %d%% +== %d%% učitano %ds left == Još %ds %i minute left -== Još %ds +== %i minut preostao %i minutes left == Preostalo: %i min. @@ -26,7 +25,7 @@ == Preostalo: %i sek. %s wins! -== %s je pobijedio! +== %s je pobedio! -Page %d- == -Strana %d- @@ -68,7 +67,7 @@ Automatically record demos == Automatski snimi demo Automatically take game over screenshot -== Automatski napravi screenshot +== Automatski snimi screenshot Blue team == Plavi tim @@ -104,7 +103,7 @@ Connect == Konektuj Connecting to -== Konektujem na +== Konektujem se na Connection Problems... == Problemi sa konekcijom... @@ -116,7 +115,7 @@ Controls == Kontrole Count players only -== Izbroj samo igrače +== Broj samo igrače Country == Država @@ -143,13 +142,13 @@ Delete demo == Obriši demo-snimak Demo details -== Detalji demo-a +== Detalji demo'a Demofile: %s == Demo-snimak: %s Demos -== Demoi +== Demo-i Disconnect == Diskonektuj @@ -167,7 +166,7 @@ Draw! == Nerešeno! Dynamic Camera -== Dinamička kamera +== Dinamična kamera Emoticon == Emoticon @@ -197,10 +196,10 @@ Filter == Filter Fire -== Pucanje +== Pucaj Folder -== Direktorijum +== Folder Force vote == Obavezno glasanje @@ -248,7 +247,7 @@ High Detail == Visoki detalji Hook -== Lanac +== Kuka Host address == Adresa servera @@ -338,10 +337,10 @@ Name == Ime Name plates size -== Veličina pozadine za ime +== Veličina pločice za ime Netversion: -== Net-verzija: +== Net verzija: New name: == Novo ime: @@ -368,13 +367,13 @@ No servers match your filter criteria == Nijedan server ne odgovara zadatom kriteriju Ok -== OK +== Ok Open == Otvori Parent Folder -== Prethodni direktorijum +== Prethodni folder Password == Lozinka @@ -458,7 +457,7 @@ Rename == Preimenuj Rename demo -== Preimenuj demo-snimak +== Preimenuj demo Reset filter == Poništi filter @@ -467,7 +466,7 @@ Reset to defaults == Resetuj podešavanja Rifle -== Laser +== Puška Round == Runda @@ -518,7 +517,7 @@ Show chat == Prikaži chat Show friends only -== Prikaži isključivo prijatelje +== Prikaži samo prijatelje Show ingame HUD == Prikaži HUD @@ -548,10 +547,10 @@ Spectate == Posmatraj Spectate next -== Posmatraj narednog +== Posmatraj sledećeg Spectate previous -== Posmatraj prethodnog +== Posmatraj prošlog Spectator mode == Posmatrački mod @@ -590,7 +589,7 @@ Texture Compression == Kompresija tekstura The audio device couldn't be initialised. -== Audio-uređaj nije moguće pokrenuti. +== Audio uređaj nije moguće pokrenuti. The server is running a non-standard tuning on a pure game type. == Server sadrži nestandardna podešavanja. @@ -617,13 +616,13 @@ UI Color == Boja menija Unable to delete the demo -== Demo-snimak nije moguće obrisati +== Demo nije moguće obrisati Unable to rename the demo -== Demo-snimak nije moguće preimenovati +== Demo nije moguće preimenovati Use sounds -== Aktiviraj zvuk +== Koristi zvuk Use team colors for name plates == Koristi timsku boju u prikazu imena @@ -644,10 +643,10 @@ Vote description: == Opis glasanja: Vote no -== Ne +== Protiv Vote yes -== Da +== Za Voting == Glasanje From f26365d097f274ab98bc936177f102dfc01d79f3 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 30 Nov 2011 01:57:52 +0100 Subject: [PATCH 10/10] added fix for last commit by DNR --- data/languages/serbian.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/languages/serbian.txt b/data/languages/serbian.txt index aad71a164..585254949 100644 --- a/data/languages/serbian.txt +++ b/data/languages/serbian.txt @@ -142,7 +142,7 @@ Delete demo == Obriši demo-snimak Demo details -== Detalji demo'a +== Detalji demo-a Demofile: %s == Demo-snimak: %s