Merge branch 'master' of git://github.com/oy/teeworlds into DDRace

This commit is contained in:
GreYFoX 2011-12-01 19:48:09 +02:00
commit 5ebf60891c
6 changed files with 58 additions and 61 deletions

View file

@ -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
@ -149,7 +148,7 @@ 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

View file

@ -2157,7 +2157,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");

View file

@ -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 <algorithm> // sort
#include <algorithm> // sort TODO: remove this
#include <base/math.h>
#include <base/system.h>
@ -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()
@ -283,27 +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));
// 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;
}
}
std::stable_sort(m_pSortedServerlist, m_pSortedServerlist+m_NumSortedServers, SortWrap(this, &CServerBrowser::SortCompareGametype));
// set indexes
for(i = 0; i < m_NumSortedServers; i++)

View file

@ -212,7 +212,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

View file

@ -38,11 +38,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;
@ -1636,4 +1635,4 @@ int CMenus::DoButton_CheckBox_DontCare(const void *pID, const char *pText, int C
default:
return DoButton_CheckBox_Common(pID, pText, "", pRect);
}
}
}

View file

@ -1408,6 +1408,7 @@ void CEditor::DoQuadPoint(CQuad *pQuad, int QuadIndex, int V)
m_SelectedPoints |= 1<<V;
else
m_SelectedPoints = 1<<V;
s_Moved = true;
}
m_SelectedQuad = QuadIndex;
@ -3863,19 +3864,27 @@ 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<CLayerQuads *>(m_lGroups[i]->m_lLayers[j]);
for(int k = 0; k < Layer->m_lQuads.size(); ++k)
CLayerQuads *pLayer = static_cast<CLayerQuads *>(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 *pLayer = static_cast<CLayerTiles *>(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);
}