mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 17:48:19 +00:00
Compare commits
11 commits
96889c8d41
...
7e8dc57194
Author | SHA1 | Date | |
---|---|---|---|
7e8dc57194 | |||
7826b2a4f7 | |||
a4aafb78bd | |||
eefcb83a4f | |||
3d6c022d0e | |||
ab3991f821 | |||
6f8fca2d3b | |||
6175022e39 | |||
e46f16ed91 | |||
134961015a | |||
4d6a00d827 |
|
@ -21,7 +21,7 @@
|
|||
# timakro 2014-06-30 18:26:59
|
||||
# deen 2020-06-26 18:32:00
|
||||
# bluesky 2022-07-05 21:00:00
|
||||
# BlaiZephyr 2024-03-19 20:05:00
|
||||
# BlaiZephyr 2024-03-23 20:55:00
|
||||
##### /authors #####
|
||||
|
||||
##### translated strings #####
|
||||
|
@ -690,7 +690,7 @@ Normal message
|
|||
== Normale Nachricht
|
||||
|
||||
AntiPing: predict grenade paths
|
||||
== AntiPing: Granatenflugkurve vorberechnen
|
||||
== Anti-Ping: Granatenflugkurve vorberechnen
|
||||
|
||||
Search
|
||||
== Suche
|
||||
|
@ -708,7 +708,7 @@ Enable highlighted chat sound
|
|||
== Ton für Nachrichten an dich aktivieren
|
||||
|
||||
AntiPing: predict weapons
|
||||
== AntiPing: Waffen vorberechnen
|
||||
== Anti-Ping: Waffen vorberechnen
|
||||
|
||||
Highlighted message
|
||||
== Hervorgehobene Nachricht
|
||||
|
|
|
@ -52,10 +52,29 @@ def find_clang_format(version):
|
|||
clang_format_bin = find_clang_format(10)
|
||||
|
||||
def reformat(filenames):
|
||||
for filename in filenames:
|
||||
with open(filename, 'r+b') as f:
|
||||
try:
|
||||
f.seek(-1, os.SEEK_END)
|
||||
if f.read(1) != b'\n':
|
||||
f.write(b'\n')
|
||||
except OSError:
|
||||
f.seek(0)
|
||||
subprocess.check_call([clang_format_bin, "-i"] + filenames)
|
||||
|
||||
def warn(filenames):
|
||||
return subprocess.call([clang_format_bin, "-Werror", "--dry-run"] + filenames)
|
||||
clang = subprocess.call([clang_format_bin, "-Werror", "--dry-run"] + filenames)
|
||||
newline = 0
|
||||
for filename in filenames:
|
||||
with open(filename, 'rb') as f:
|
||||
try:
|
||||
f.seek(-1, os.SEEK_END)
|
||||
if f.read(1) != b'\n':
|
||||
print(filename + ": error: missing newline at EOF", file=sys.stderr)
|
||||
newline = 1
|
||||
except OSError:
|
||||
f.seek(0)
|
||||
return clang or newline
|
||||
|
||||
def main():
|
||||
p = argparse.ArgumentParser(description="Check and fix style of changed files")
|
||||
|
|
|
@ -236,4 +236,4 @@ void CFreezeBars::OnRender()
|
|||
{
|
||||
RenderFreezeBar(LocalClientId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1809,8 +1809,8 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
|||
}
|
||||
|
||||
// GPU list
|
||||
const auto &GPUList = Graphics()->GetGpus();
|
||||
if(GPUList.m_vGpus.size() > 1)
|
||||
const auto &GpuList = Graphics()->GetGpus();
|
||||
if(GpuList.m_vGpus.size() > 1)
|
||||
{
|
||||
CUIRect Text, GpuDropDown;
|
||||
MainView.HSplitTop(10.0f, nullptr, &MainView);
|
||||
|
@ -1819,20 +1819,20 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
|||
MainView.HSplitTop(20.0f, &GpuDropDown, &MainView);
|
||||
Ui()->DoLabel(&Text, Localize("Graphics card"), 16.0f, TEXTALIGN_MC);
|
||||
|
||||
static std::vector<const char *> s_vpGpuIDNames;
|
||||
static std::vector<const char *> s_vpGpuIdNames;
|
||||
|
||||
size_t GPUCount = GPUList.m_vGpus.size() + 1;
|
||||
s_vpGpuIDNames.resize(GPUCount);
|
||||
size_t GpuCount = GpuList.m_vGpus.size() + 1;
|
||||
s_vpGpuIdNames.resize(GpuCount);
|
||||
|
||||
char aCurDeviceName[256 + 4];
|
||||
|
||||
int OldSelectedGpu = -1;
|
||||
for(size_t i = 0; i < GPUCount; ++i)
|
||||
for(size_t i = 0; i < GpuCount; ++i)
|
||||
{
|
||||
if(i == 0)
|
||||
{
|
||||
str_format(aCurDeviceName, sizeof(aCurDeviceName), "%s (%s)", Localize("auto"), GPUList.m_AutoGpu.m_aName);
|
||||
s_vpGpuIDNames[i] = aCurDeviceName;
|
||||
str_format(aCurDeviceName, sizeof(aCurDeviceName), "%s (%s)", Localize("auto"), GpuList.m_AutoGpu.m_aName);
|
||||
s_vpGpuIdNames[i] = aCurDeviceName;
|
||||
if(str_comp("auto", g_Config.m_GfxGpuName) == 0)
|
||||
{
|
||||
OldSelectedGpu = 0;
|
||||
|
@ -1840,8 +1840,8 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
|||
}
|
||||
else
|
||||
{
|
||||
s_vpGpuIDNames[i] = GPUList.m_vGpus[i - 1].m_aName;
|
||||
if(str_comp(GPUList.m_vGpus[i - 1].m_aName, g_Config.m_GfxGpuName) == 0)
|
||||
s_vpGpuIdNames[i] = GpuList.m_vGpus[i - 1].m_aName;
|
||||
if(str_comp(GpuList.m_vGpus[i - 1].m_aName, g_Config.m_GfxGpuName) == 0)
|
||||
{
|
||||
OldSelectedGpu = i;
|
||||
}
|
||||
|
@ -1855,13 +1855,13 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
|
|||
static CUi::SDropDownState s_GpuDropDownState;
|
||||
static CScrollRegion s_GpuDropDownScrollRegion;
|
||||
s_GpuDropDownState.m_SelectionPopupContext.m_pScrollRegion = &s_GpuDropDownScrollRegion;
|
||||
const int NewGpu = Ui()->DoDropDown(&GpuDropDown, OldSelectedGpu, s_vpGpuIDNames.data(), GPUCount, s_GpuDropDownState);
|
||||
const int NewGpu = Ui()->DoDropDown(&GpuDropDown, OldSelectedGpu, s_vpGpuIdNames.data(), GpuCount, s_GpuDropDownState);
|
||||
if(OldSelectedGpu != NewGpu)
|
||||
{
|
||||
if(NewGpu == 0)
|
||||
str_copy(g_Config.m_GfxGpuName, "auto");
|
||||
else
|
||||
str_copy(g_Config.m_GfxGpuName, GPUList.m_vGpus[NewGpu - 1].m_aName);
|
||||
str_copy(g_Config.m_GfxGpuName, GpuList.m_vGpus[NewGpu - 1].m_aName);
|
||||
CheckSettings = true;
|
||||
s_GfxGpuChanged = NewGpu != s_OldSelectedGpu;
|
||||
}
|
||||
|
|
|
@ -2223,13 +2223,7 @@ void CGameClient::CClientData::Reset()
|
|||
m_Afk = false;
|
||||
m_Paused = false;
|
||||
m_Spec = false;
|
||||
m_SkinInfo.m_BloodColor = ColorRGBA(1, 1, 1);
|
||||
m_SkinInfo.m_ColorableRenderSkin.Reset();
|
||||
m_SkinInfo.m_OriginalRenderSkin.Reset();
|
||||
m_SkinInfo.m_CustomColoredSkin = false;
|
||||
m_SkinInfo.m_ColorBody = ColorRGBA(1, 1, 1);
|
||||
m_SkinInfo.m_ColorFeet = ColorRGBA(1, 1, 1);
|
||||
m_SkinInfo.m_SkinMetrics.Reset();
|
||||
m_SkinInfo.Reset();
|
||||
|
||||
m_Solo = false;
|
||||
m_Jetpack = false;
|
||||
|
|
|
@ -79,4 +79,4 @@ bool CEditorImage::DataEquals(const CEditorImage &Other) const
|
|||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2263,12 +2263,17 @@ void CCharacter::Pause(bool Pause)
|
|||
ResetHook();
|
||||
GameWorld()->ReleaseHooked(GetPlayer()->GetCid());
|
||||
}
|
||||
m_PausedTick = Server()->Tick();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Core.m_Vel = vec2(0, 0);
|
||||
GameServer()->m_World.m_Core.m_apCharacters[m_pPlayer->GetCid()] = &m_Core;
|
||||
GameServer()->m_World.InsertEntity(this);
|
||||
if(m_Core.m_FreezeStart > 0 && m_PausedTick >= 0)
|
||||
{
|
||||
m_Core.m_FreezeStart += Server()->Tick() - m_PausedTick;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -104,6 +104,7 @@ private:
|
|||
|
||||
bool m_Alive;
|
||||
bool m_Paused;
|
||||
int m_PausedTick;
|
||||
int m_NeededFaketuning;
|
||||
|
||||
// weapon info
|
||||
|
|
Loading…
Reference in a new issue